I'm attempting to update a variable within $scope in a controller function, and while the assignment is successful, it doesn't reflect in the view.
app.controller('LoginCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.test = "test";
$scope.logIn = function() {
// Even though this changes the value to test2, it doesn't show up in the view.
$scope.test = "test2";
};
}]);
In the login.html:
DEBUG: {{ test }}
And the routeProvider:
$routeProvider
.when('/', {
templateUrl: '/views/login.html',
controller: 'LoginCtrl'
})
Am I missing something from the documentation?
Thanks!