angularjs - colons in directive names - ng:repeat instead of ng-repeat -


obviously code here works

    <tr ng:repeat="item in invoice.items">         <td><input type="text" ng:model="item.description"class="input-small"></td>                    <td><input type="number" ng:model="item.qty" ng:required class="input-mini"></td>         <td><input type="number" ng:model="item.cost" ng:required class="input-mini"></td>         <td>{{item.qty * item.cost | currency}}</td>         <td>             <a href ng:click="removeitem($index)">&times</a>         </td>     </tr> 

http://jsfiddle.net/slav123/75m7e/3/

but why use colons?

the docs https://docs.angularjs.org/api/ng/directive/ngrepeat nothing syntax.

from docs:

best practice: prefer using dash-delimited format (e.g. ng-bind ngbind). if want use html validating tool, can instead use data-prefixed version (e.g. data-ng-bind ngbind). the other forms shown above are accepted legacy reasons advise avoid them.

-- angularjs developer guide -- directives.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -