How to use the .run
of AngularJS directive?
How to use the .run
of AngularJS directive?
var app = angular.module('aplicacao', ['highcharts-ng']);
app.run(function($rootScope) {
...
});
Explaining:
var app = angular.module('aplicacao', ['highcharts-ng']);
Create an angular module called 'application' that injects the dependency of 'highcharts-ng'.
app.run(function($rootScope) {
It is the starting point of your application. As a comparison, it is the same as the main (args) of java / c #.
And inside it you will write your code with the desired functions (: