本文整理匯總了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)