angularjs - Is Angular caching my object? -
so i'm trying build drag & drop list ctrl/shift selection in angular. reason, when effort load template / directive, angular uses lastly array loaded @ given point. mean is, if load 2 arrays, each in separate <ul>
elements, utilize sec 1 both of them. overall, it's pretty confusing why happens.
see fiddle here.
you're initializing same scope attribute twice:
ng-init="itemlist=itemsintrash" ... ng-init="itemlist=itemsthatarereal"
so, 1 time template has been initialized, itemlist
variable references itemsthatarereal
array, , 2 included templates display array.
angularjs angularjs-directive
No comments:
Post a Comment