Monday, 15 March 2010

javascript - AngularJS Data Binding Breaks ngRepeat + Strange Behavior -


Background : I'm a system system that's closed for front end development. Just moving around with the glass became creative with the data binding and now I am trying to understand this behavior:

  & lt; Div ng-app & gt; & Lt; Div class = "container" & gt; Name & lt; Input type = "text" ng-model = "user.name" & gt; & Lt; / Div & gt; {{User.name}} 

I hope that it takes input from my box, mirror the text between the input box, and repeat each letter on its line below.

If I type "test" in any one input, then ng-repeat will break when a sheet repeats

typing alphabet works sequentially like I I hope.

Why is ng-repeat braking when duplicate input characters? I have no practical use for this, I was experimenting with Kangaroo only for fun and came upon it and did not understand it.

NG-Enhanced duplicate entries will not accept. As a duplicate entry in test , this will fail

Add track to avoid this .

When we do not enter any by expression (in each letter case), it is considered as a unique identifier so that the entry in the list Can be linked to track changes

& lt; Li ng-repeat = "l in user.name" $ ​​index "& gt; {{l}}


No comments:

Post a Comment