Closed lykyd closed 7 years ago
Anyone please?
Im not shure I understand the question .
The moment object is provided as an angular constant here. I think it is also a global variable but it is cleaner to access it trough angulars dependency injection system.
angular.module('fooApp')
.controller('FooCtrl', function ($scope,outlet,moment) {
console.log(moment().hour(8).minute(0).second(0).toDate());
});
Can you give a code example of how to "inject the moment variable into the constructor." ?