1
我使用角CLI创建angular2应用程序,但是当我使用下面的构造函数,它会给错误这样Angular2给类型错误参数“ElementRef”是不能分配给类型的参数“ViewContainerRef”
错误
Argument of type 'ElementRef' is not assignable to parameter of type 'ViewContainerRef'. Property 'element' is missing in type 'ElementRef'.
我的构造函数是
constructor(_elementRef: ElementRef, _loader: DynamicComponentLoader,_parentRouter: Router, @Attribute('name') nameAttr: string, private userService: LoginComponent)
{
super(_elementRef, _loader, _parentRouter, nameAttr);
this.parentRouter = _parentRouter;
this.publicRoutes = ['', 'login', 'signup'];
}
什么是错我的代码?我正在使用angular2 rc.3
这个类是如何构造的? –
您构建或者让您支持Angular DI? –
我从博客获得了关于认证的信息。 –