The first parameter to $watch should either be a string or a function (docs). Right now you’re passing it the value of $rootScope.uPLevel on controller initialization.
$scope.$watch(function() {
return $rootScope.uPLevel;
}, function() {
$scope.userPLevel = $rootScope.uPLevel;
}, true);
Two sidenotes:
- It may be prudent to store this value in a service instead of
$rootScope. - If
uPLevelis only an integer (as your example suggests) then you don’t need to passtrueas the third parameter – that’s only for arrays and objects. If you do want to watch a collection, then I suggest using$watchCollectioninstead.