本文整理汇总了TypeScript中angular.ILogService类的典型用法代码示例。如果您正苦于以下问题:TypeScript ILogService类的具体用法?TypeScript ILogService怎么用?TypeScript ILogService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ILogService类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: return
return (str: string, regExStr: string, replaceValue: string) => {
if (!isDefined(regExStr)) {
$log.debug(`Did not supply regex string for 'replace' filter.`);
return str;
} else if (!isDefined(replaceValue)) {
$log.debug(`Did not supply replacement value for 'replace' filter.`);
return str;
} else {
return str.replace(new RegExp(regExStr, 'g'), replaceValue);
}
};
示例2: function
function (event, unfoundState, fromState, fromParams) {
$log.warn('$stateNotFound', {
event: event,
unfoundState: unfoundState,
fromState: fromState,
fromParams: fromParams
});
});
示例3: resumeScheduler
const watchDocumentVisibility = (): void => {
this.$log.debug('document visibilityState changed to: ', document.visibilityState);
if (document.visibilityState === 'visible') {
resumeScheduler();
} else {
suspendScheduler();
}
};
示例4: loadMessage
loadMessage(): void {
this.$log.info(`[${this.name}] Loading message...`, this);
this.sampleService
.getData()
.then(this.onDataReceived.bind(this))
.catch(this.handleError.bind(this));
}
示例5: updateInStorages
// todo: add api storage
updateInStorages(basket: IBasket): IPromise<IBasket> {
const stored = this.storeBasketInLocalStorage(basket);
if (!stored) {
this.$log.error('Basket: Unable to store basket in local storage');
}
return this.fetchBasket();
}
示例6: Date
const resumeScheduler = (): void => {
suspended = false;
const now = new Date().getTime();
this.$log.debug('auto refresh resumed');
if (now - lastRunTimestamp > pollSchedule) {
run();
} else {
scheduleNextRun(pollSchedule - (now - lastRunTimestamp));
}
};
示例7: filter
}).then((searchResults: ISearchResults<ISecurityGroupSearchResult>) => {
let result: ISecurityGroup[] = [];
if (!searchResults || !searchResults.results) {
this.$log.warn('WARNING: Gate firewall endpoint appears to be down.');
} else {
result = filter(searchResults.results, { application: applicationName });
}
return result;
});
示例8:
$onInit(): void {
this.$log.info(`[${this.name}] Initializing Controller...`);
this.loadMessage();
const myObs$: Observable<number> = Observable
.from([1,2,3,4,5])
.map(n => n * 5);
this.subscription = myObs$.subscribe(
n => console.log("data", n),
e => console.error("error", e),
() => console.log("COMPLETED")
);
}
示例9:
const subscription = $uiRouter.globals.start$.subscribe((transition: Transition) => {
const details = {
transition: transition,
toState: transition.to(),
toParams: transition.params('to'),
fromState: transition.from(),
fromParams: transition.params('from'),
};
$log.debug('$stateChangeStart', details);
const success = () => $log.debug('$stateChangeSuccess', details);
const failure = (error: any) => $log.debug('$stateChangeError', Object.assign(details, { error }));
transition.promise.then(success, failure);
});