One way to share variables across multiple controllers is to create a service and inject it in any controller where you want to use it.
Simple service example:
angular.module('myApp', [])
.service('sharedProperties', function () {
var property = 'First';
return {
getProperty: function () {
return property;
},
setProperty: function(value) {
...
Recent Posts
Showing posts with label Angular. Show all posts
Showing posts with label Angular. Show all posts
Subscribe to:
Posts (Atom)