I am working with AngularJs
and I am initializing a variable in the ng-init
of that model.
<body ng-init="allowedState=2" ng-controller="amCtrl">
</body>
Now what I want is to declare a constant
using this variable which will then be shared within the app.
angular.module('amModule').constant('temp', ?)
I am trying to figure this out and I am now wondering if it's even possible?