I have a deeply thought-out logic that I would like to illustrate with an example. However, in order to present it effectively, I am looking for suggestions on how to simplify the process without relying too heavily on the controller.
<select class="form-control" ng-model='zoo' id='zoo' name='animal'
ng-options="item as item.animal for item in animals track by item.animal">
</select>
One approach I am considering is:
<select class="form-control" ng-model='zoo' id='contrato_objetivo' name='animal'
ng-options="item as item.animal.charAt(0)==" "?item.animal.substr(1):item.animal for item in animals track by item.animal">
My question relates to removing the first character of a string that has an initial space when displayed in the view. Any tips on how to achieve this?
http://fiddle.jshell.net/3g2pmrom/
Thank you for your assistance!