JavaScript AngularJS Issue with objects -


i've been running in problem don't understand. have $rootscope object, user, $rootscope.user. within object, have array, missions, $rootscope.user.missions.

when console.log($rootscope.user) (which correct, have 1 mission)

image

but if console.log($rootscope.user.missions) on next line, nothing (not undefined, nothing), , if console.log($rootscope.user.missions.length), return 0 (as if don't have mission).

does have idea what's happening exactly?

edit: here screenshot of console.log($rootscope.user) return image on line 3390, run console.log($rootscope.user.missions)

edit: on first line, console.log($rootscope.user.missions), , on second line console.log($rootscope.user.missions.length). image


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -