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
Post a Comment