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)

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
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
Post a Comment