How can I run orderBy filter only once when my view is initialized? I don't want my list to be reordered during runtime.
<li ng-repeat="service in quote.services | orderBy:'index'" ></li>
How can I run orderBy filter only once when my view is initialized? I don't want my list to be reordered during runtime.
<li ng-repeat="service in quote.services | orderBy:'index'" ></li>
Use the orderBy as a filter in your controller instead:
See the filter docs for all the options.