angularjs - Catching access to $scope properties -


is possible catch following: if have template

<div ng-controller="somecontroller">     {{notthere}} </div> 

and notthere not defined in controllers $scope, can have callback fired handle this? like:

$scope.$catch(function(name) {     // name === 'notthere'     return 'someval'; } 

br, daniel

well, can do

<div ng-controller="somecontroller">     {{notthere || 'someval'}} </div> 

but i'm not sure if meets requirements


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -