I am working in ionic and angular. I want to set variables in controller and use them in view. I am using cookies to save current logged in user information. Here is the controller code:
.controller('profileCtrl',['$http','$scope',
'fileUpload','$cookies','$cookieStore','$window',
function($http, $scope, fileUpload,$cookies,$cookieStore,$window) {
$scope.CurrentUser = $cookieStore.get('CurrentUserInfo');<br/>
$scope.CurrentUserFullname = $scope.CurrentUser.User.fullname;<br/>
console.log($scope.CurrentUserFullname); **// working. Suppose name is Simerjit
}])
Now in view profile.html. I want to display the name. I use this:
<h1>{{CurrentUserFullname}}</h1> // not working
Anyone please help. I am new in Ionic and angularjs.