Skip to content Skip to sidebar Skip to footer

Keep Checkbox Checked After Navigating Away From Page

I have a check box that I need to keep checked after navigating away from the page. I am using AngularJS and bootstrap. Right now I am resetting the bound variable to false every

Solution 1:

Try using $rootScope instead. It is global to all controllers

Something like this

.controller('someCtrl', function($scope, $rootScope) {
  $rootScope.disableCheck = true;//set root scope here and refer to it as needed from other controlers
})

Post a Comment for "Keep Checkbox Checked After Navigating Away From Page"