Angularjs are missing parameters, so they are hidden
3 answers
Store them in a shared service and use them when you need it, quick example:
app.factory("shared", function() {
var data = null;
return {
setData: function(someData) {
data = someData;
},
getData: function() {
return data;
}
}
});
And now use it!
app.controller("myCtrl", function($scope, shared) {
$scope.data = shared.getData();
});
+1
source to share
A good way to do this is by using the Angular service template. Since controllers are functions and services are objects (single-point), you can have multiplexing services according to the different functionality you have in your application.
You should see the documentation for Angular providers here: https://docs.angularjs.org/guide/providers
0
source to share