本文整理汇总了TypeScript中ng2-toastr/ng2-toastr.ToastsManager.setRootViewContainerRef方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ToastsManager.setRootViewContainerRef方法的具体用法?TypeScript ToastsManager.setRootViewContainerRef怎么用?TypeScript ToastsManager.setRootViewContainerRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ng2-toastr/ng2-toastr.ToastsManager
的用法示例。
在下文中一共展示了ToastsManager.setRootViewContainerRef方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
public constructor(
viewContainerRef: ViewContainerRef,
// componentsHelper:ComponentsHelper,
private router: Router,
private authService: AuthService,
public toastr: ToastsManager) {
// You need this small hack in order to catch application root view container ref (ng2-bootstrap)
this.viewContainerRef = viewContainerRef;
// componentsHelper.setRootViewContainerRef(viewContainerRef);
this.toastr.setRootViewContainerRef(viewContainerRef); // hack for angular >= 2.2
}
示例2: constructor
constructor(
public elementRef: ElementRef,
public renderer: Renderer,
public router: Router,
public activatedRoute: ActivatedRoute,
public translate: TranslateService,
public toastr: ToastsManager,
public vcr: ViewContainerRef
) {
this.toastr.setRootViewContainerRef(vcr);
}
示例3: constructor
constructor(
public toastr: ToastsManager,
public vcr: ViewContainerRef
) {
this.toastr.setRootViewContainerRef(vcr);
}
示例4: constructor
constructor(private toastrService: ToastrService, private vcr: ViewContainerRef, private apiService: YoutubeApiService, private authService: AuthService) {
this.toastr = this.toastrService.manager();
this.toastr.setRootViewContainerRef(vcr);
}