javascript - AngularJS - more of the same directives on one page with its own state -


in ralation question call method in directive controller other controller.

how can put more 1 independent directives of same type on page? because of common api (singleton) state shared. if place 2 same directives there both reflect 1 instance of api , same state.

i think you're talking isolating scope of directive, relevant documentation is here. may simple scope: true, makes isolated scope directive inherits. can read here.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

android - IBM Worklight 6.1 [Application Error] There was a network error (file:///android_asset/www/index.html) -