In my javascript I have an array
$scope.quoteList =
[
{
select: false,
laymansDescription: "Nathan",
quoteNumber: "ING-70440-21",
version: "02",
quoteDate: "Feb 5,2013",
expirationDate: "Aug 5,2013",
internalNotes: "This quote is using test data",
},
{
select: false,
laymansDescription: "Mitch",
quoteNumber: "ING-70440-01",
version: "02",
quoteDate: "Feb 5,2013",
expirationDate: "Aug 5,2013",
internalNotes: "This quote is using test data",
},
{
select: false,
laymansDescription: "Stephen",
quoteNumber: "ING-70440-01",
version: "02",
quoteDate: "Feb 5,2013",
expirationDate: "Aug 5,2013",
internalNotes: "This quote is using test data",
}
];
And I am trying to make a selector that will only show unique quoteNumbers ie. ING-70440-21 and ING-70440-01. However when I try to use the 'unique' option in angular, nothing is showing up.
<select class="form-control" ng-options="quote.quoteNumber for quote in quoteList | unique:'quoteNumber'" ng-model="quoteModel1" />
It works fine without the unique tag. What am I doing wrong? I pretty new to angular so it might be something really simple.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…