8:00 – 2:30 SR
- More angular. Filters yesterday, directives today?
- Discovered an interesting problem with bound arrays, at least for strings. If the value that Angular is using to connect it to the div is the same for two or more rows, it complains with a “Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use ‘track by’ expression to specify unique keys”. The default seems to be the first column. This is discussed in the documentation here, with the upshot that you can generally get around this by using “
<div ng-repeat="value in [4, 4] track by $index"></div>“. not sure how that would play with some of the large tables we’re using. I’ve just tried this for objects, and it seems just fine. This implies that we’ll need to be careful about how we populate datagrids, but nothing horrible.
- Working my way through ng-route.