Monday, 24 August 2015

AngularJS $scope

I am learning AngularJS as part of the project I am working on.

One problem I was having was not binding my values to $scope, which is necessary otherwise Angular doesn't retain the information. Without the correct binding, my console logs were printing the correct value but the wrong data was being displayed on my .ascx.

Example:

This does not set the IsAuthorised bool such that it will retain the value. The correct way is:

No comments:

Post a Comment