Reputation: 232
I was messing around in the console and came across a strange object: ng-1392763474770
Logging it returned:
ReferenceError: ng is not defined
What exactly is this? I couldn't bring anything up through my searches.
P.S. This page is just for demo, there is no html.
Upvotes: 2
Views: 312
Reputation: 32367
This number is a date timestamp:
Date(1392763474770)
"Wed Feb 19 2014 01:49:41 GMT+0200 (IST)"
The reason why you get ReferenceError: ng is not defined
is because it's not a valid javascript, instead you can use the object bracket notation:
element['ng-1392763474770']
This is a JQLite.expando
, from the source code:
jqName = JQLite.expando = 'ng-' + new Date().getTime()
jqLite uses it to cache element's data and avoid circular references.
See this: what is the meaning of jquery random attributes in html ? [expando attribute]
Upvotes: 5