Open meredrica opened 7 years ago
Hello!
I cannot get the amMoment object injected in my angular app (written in timescript).
(function () { angular.module('app.config', ['angularMoment']); }()); namespace app.config { angular .module('app.config') .config(AmMomentConfig); AmMomentConfig.$inject=['amMoment']; function AmMomentConfig($amMoment:any) { amMoment.setLocale('de-at'); } }
I also tried using the $injector like so:
namespace app.config { angular .module('app.config') .config(AmMomentConfig); AmMomentConfig.$inject=['$injector']; function AmMomentConfig($injector:any) { $injector.get('amMoment'); } }
injection works ($inject is there) but the moment i want to inject amMoment, I get an UnknownProvider error. Any idea what could go wrong here?
Hello!
I cannot get the amMoment object injected in my angular app (written in timescript).
I also tried using the $injector like so:
injection works ($inject is there) but the moment i want to inject amMoment, I get an UnknownProvider error. Any idea what could go wrong here?