In html :
<md-card-title-text ng-controller="ProfileCtrl">
<span ng-model="user.displayName" class="md-headline">userName</span>
<span ng-model="user.email" class="md-subhead">user@abc.com</span>
</md-card-title-text>
In angularjs code:
angular.module('authApp')
.controller('ProfileCtrl', function($scope) {
$scope.user = {};
$scope.user.displayName = localStorage.username;
$scope.user.email = localStorage.email;
console.log($scope.user.displayName)
});
The problem is that ng-model
doesn't update when scope value changed in controller. How can I solve this problem ?