Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm creating a back end custom section, genrally in my controllers I am using the this key word and assigning it to VM
var vm = this;
Then inside my HTML views I am delearing my controllers like this:
<div ng-controller="ControllerName as vm">
But I have been wondering why when I call
$scope or vm in the console it turns out to be undifined.
Can anyone explain this to me?
This was a good explaination in the end.
https://stackoverflow.com/questions/13743058/how-do-i-access-the-scope-variable-in-browsers-console-using-angularjs
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
$scope and VM are undefined In console - Why?
I'm creating a back end custom section, genrally in my controllers I am using the this key word and assigning it to VM
Then inside my HTML views I am delearing my controllers like this:
But I have been wondering why when I call
$scope or vm in the console it turns out to be undifined.
Can anyone explain this to me?
This was a good explaination in the end.
https://stackoverflow.com/questions/13743058/how-do-i-access-the-scope-variable-in-browsers-console-using-angularjs
is working on a reply...