AngularJs - Filtering out duplicates in select control -
I have a selected list of Excel types, each one has a property with a front axle or a type of rear axle, Can not filter double words of 'front' and 'rear'.
Update: HTML: Controller: I am completely confused and yes, the API works, I chrome> Network & gt; Response window The error you saw in your edit, I'm sure the reason is That's what I have described in my comment, which is the use of the expression
& lt; Ng-model = "type axleType type type" ng-options = "unique type for type" & gt;
$ scope.axleTypes = API.GetAxleTypes (); "Full-floating banjo housing", "", "type": "front", "id": 1}, {"$ id": "I id, telescopic type shock absorbers": "", "description" Type ":" rear "," id ": 2}, {" $ id ":" 3 "," description ":" something else "," type ":" rear "," id ": 2}, {" $ Id ":" 4 "," description ":" I beam, binocular type shock absorber "," type ":" front "," id ": 4}]; // This works $ scope.uniqueTypes = _.uniq (_.pluck ($ scope.fixedAxleTypes, 'type')); // it is not //$scope.uniqueTypes = _.uniq (_. Incision ($ scope.axleTypes, 'type')); // it is not // paste //$scope.uniqueTypes = _.uniq (_. (API GateXle Type (), 'type'));
(axle type) for the reference, where that expression can not be evaluated. Since you are not using the expression in the filter implementation, so you can completely leave it, I believe.
Comments
Post a Comment