Angularjs と Typescript の両方を使用してコントローラーにファクトリを挿入しようとしましたが、このエラーが発生していますError: [$injector:unpr] http://errors.angularjs.org/1.2.9/$injector/unpr?p0=AuthenticationProvider%20%3C-%20Authentication
。
私は周りを研究してきましたが、私がやったことはいくつかの解決策に似ているため、解決策を見つけることができません。
これが私のログインコントローラーモジュールです
import Authentication = require('AuthenticationService');
module LoginController{
export interface UIMainScope extends ng.IScope {
login: (credential: any) => void;
}
export class Controller {
static $inject = ['$scope', '$http', 'Main', 'Authentication'];
constructor (){}
}
export = LoginController
angular.module('App').controller('Controller', LoginController.Controller);
メソッドを呼び出すためにここに何かを注入するのを忘れましたか?