I am confused when reading the Angularjs Y240 Style Guide .
It talks about creating Angular Constant global variables for global provider libraries so that we can implement vendor libraries that are otherwise global.
I understand that you must do this:
<script src="moment.js"></script>
before loading angular.js and the controllers and directives in app.js, and the momentary object is a global variable. How do you use the following code to make it a service, and you can enter it as needed?
Please correct me if I do not see the whole picture.
(function() {
'use strict';
angular
.module('app.core')
.constant('toastr', toastr)
.constant('moment', moment);
})();
:
"" . ? , . .