johnpapa / ng-demos

variety of angular demos
MIT License
1.7k stars 961 forks source link

Constant vs Dependencies #79

Open FredLackeyOfficial opened 8 years ago

FredLackeyOfficial commented 8 years ago

In the "cc-bmean" demo (not sure about the others) why did you bring in toastr and moment as constants (in constants.js) rather than listing them in the module's dependencies list when it was declared?

/* global toastr:false, moment:false */
(function () {
    'use strict';

    angular
        .module('app.core')
        .constant('moment', moment)
        .constant('toastr', toastr);
})();