本文整理汇总了TypeScript中@covalent/core.TdLoadingService类的典型用法代码示例。如果您正苦于以下问题:TypeScript TdLoadingService类的具体用法?TypeScript TdLoadingService怎么用?TypeScript TdLoadingService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TdLoadingService类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(private _loadingService: TdLoadingService, viewContainerRef: ViewContainerRef) {
let options: ILoadingOptions = {
name: 'stringName',
type: LoadingType.Circular,
};
this._loadingService.createOverlayComponent(options, viewContainerRef);
let options2: ILoadingOptions = {
name: 'stringName2',
type: LoadingType.Linear,
};
this._loadingService.createOverlayComponent(options2, viewContainerRef);
};
示例2:
}).catch((errors: any[]) => {
this._loadingService.resolve('activate.success');
console.log('errors???', errors);
if (errors[0].code === 'invalid_args') {
this._snackBar.open(errors[0].fields[0].captcha[0], 'Error', {
duration: 5000,
});
}
}).then(() => {
示例3: ngOnInit
ngOnInit() {
this._loadingService.register('activate.success');
this.code = this._route.snapshot.params['code'];
this._http.request('/ajax/auth/activate/' + this.code, {
method: 'PUT',
}).then((result) => {
this._loadingService.resolve('activate.success');
}).catch((errors: any[]) => {
this._loadingService.resolve('activate.success');
console.log('errors???', errors);
if (errors[0].code === 'invalid_args') {
this._snackBar.open(errors[0].fields[0].captcha[0], 'Error', {
duration: 5000,
});
}
}).then(() => {
});
}
示例4: setTimeout
setTimeout(() => {
this._loadingService.resolve();
}, 20*1000);
示例5: ngOnInit
ngOnInit(): void {
this._loadingService.register();
setTimeout(() => {
this._loadingService.resolve();
}, 20*1000);
}
示例6:
TimerWrapper.setTimeout(() => {
this._loadingService.resolve('stringName2');
}, 4000)