Answer the question
In order to leave comments, you need to log in
Why is the variable in the view not being updated?
HTML part:
<menu class="col-md-offset-2" ng-controller="SideBar" id="menu">
<i class="fa fa-bars" ng-click="test()" ng-model="data"></i>
</menu>
...
<section>
<div ng-controller="SideBar" >
{{data}}
</div>
</section>
angular
.module('CheckMyCode')
.controller('SideBar',function ($scope,Auth){
$scope.data = 'Data'
$scope.test = function () {
$scope.data = 'New';
}
Error: $rootScope:inprog
Action Already In Progress
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question