angularjsmd-select

AngularJS: get the order of selection in md-select multiple


When I select two options in <md-select>, I got array of two values. My question is how to get the order of selection?

For example in the codepen, when I select One first, and then select Two, I got ['1','2']. Is it possible that I can get ['2','1'] when I select the Two first and then One?


Solution

  • You should do it by implement ng-change yourself. This's my example in codepen

    https://codepen.io/vuph31/pen/dJvGmN?editors=1111