This strange behaviour with console is worth paying attention to: it updates the object when you expand it. Say we have:
obj = {}
obj.a ={x:1} //give it something worth displaying the expand triangle for
console.log(obj)
obj.b =1
console.log(obj)
In console we’d get:
▶ Object{a:Object}
▶ Object{a:Object, b:1}
Which displays the difference between those two copies of obj
correctly. However when you expand the two, they’re no different:
▼ Object{a:Object}
▶ a:Object
b:1
▶ __proto__:Object
▼ Object{a:Object, b:1}
▶ a:Object
b:1
▶ __proto__:Object
With $route
But at least we could tell from the console that something is updated asynchronously if the one line console is different from its expansion, for instance when the $route
with only two key/value pairs:
▶ Object {routes:Object, reload:function}
Expands into three:
▶ Object {routes:Object, reload:function}
▶ current: angular.extend.angular.extend
▶ reload:function(){}
▶ routes:Object
▶ __proto__:Object