javascript - Why my angular code turns to comment? -
i use angularjs. html comment after render. why? before render code:
<select data-ng-model="selecteddate"> <option data-ng-repeat="date in oldrecords" value="{{}}">{{date}}</option> </select>
after render:
<section> <select data-ng-model="selecteddate" class="ng-pristine ng-valid"> <!-- ngrepeat: date in oldrecords --> </select> </section>
its better use ng-options in case ,
there comment shown because $scope.oldrecords either doesn't exist or empty.
Comments
Post a Comment