I'm learning Angularjs and I have 2 templates pages - a login.html page and an index.html page.
I'm using this directive - https://github.com/pablojim/highcharts-ng to create a chart on my index.html page.
The problem i'm having, is that I don't want to have to include <script src="js/highcharts-ng.js"></script> in my login.html page because it's not used on that page, but with the code I have below, I get an error if i don't have this script included.
How can I move the 'highcharts-ng into just 1 controller rather than into my entire app?
app.js
var myezteam = angular.module('myezteam', ['highcharts-ng']); //<-- Don't want highcharts-ng here
dashboard.js
myezteam.controller('DashboardController', ['$scope', '$http', 'myezteamBase', function($scope, $http, myezteamBase) {
...
I tried this but it gives me this error: Uncaught SyntaxError: Unexpected token -
myezteam.controller('DashboardController', ['$scope', '$http', 'myezteamBase', 'highcharts-ng', function($scope, $http, myezteamBase, highcharts-ng) {
    ...
['highcharts-ng']and one just[]app.js. Could use 2 different app.js files, or set a global variable in script tag on each page and check that value using conditional in app.js to set correct module dependency