What is meaning contain "$" in the key in object on angularjs ng-repeat -


i trying simple test.

this below source works.

<html ng-app="test">     <head>         <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script>         <script type="text/javascript">         var test = angular.module("test", []);         </script>     </head>     <body>         <div ng-repeat="(key, value) in {'a':'a'}">{{key}}:{{value}}</div>     </body> </html> 

but, below source not working.

<html ng-app="test">     <head>         <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script>         <script type="text/javascript">         var test = angular.module("test", []);         </script>     </head>     <body>         <div ng-repeat="(key, value) in {'$a':'a'}">{{key}}:{{value}}</div>     </body> </html> 

everything same changed key 'a' '$a' in repeated target object.

what meaning contain $ character in object key?

the $ symbol used angular reference internal members (aka, angular specific modules).

see https://github.com/angular/angular.js/issues/1549


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -