当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ILogService.debug方法代码示例

本文整理汇总了TypeScript中angular.ILogService.debug方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ILogService.debug方法的具体用法?TypeScript ILogService.debug怎么用?TypeScript ILogService.debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在angular.ILogService的用法示例。


在下文中一共展示了ILogService.debug方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
   }
 };
开发者ID:mizzy,项目名称:deck,代码行数:11,代码来源:replace.filter.ts

示例2: resumeScheduler

 const watchDocumentVisibility = (): void => {
   this.$log.debug('document visibilityState changed to: ', document.visibilityState);
   if (document.visibilityState === 'visible') {
     resumeScheduler();
   } else {
     suspendScheduler();
   }
 };
开发者ID:jcwest,项目名称:deck,代码行数:8,代码来源:scheduler.factory.ts

示例3: 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));
   }
 };
开发者ID:jcwest,项目名称:deck,代码行数:10,代码来源:scheduler.factory.ts

示例4:

  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);
  });
开发者ID:jcwest,项目名称:deck,代码行数:15,代码来源:stateChange.logger.ts

示例5: run

export function run(
    $log: ILogService,
    $rootScope: IRootScopeService,
    $timeout: ITimeoutService
) {
    $log.debug('app module - run');

    $rootScope.$on('$stateChangeStart',
        function (event: ng.IAngularEvent, toState) {
            $log.debug('$stateChangeStart - name:', toState.name);
        });

    $rootScope.$on('$stateChangeSuccess',
        function (event, toState) {
            $log.debug('$stateChangeSuccess - name:', toState.name);
        });

    $rootScope.$on('$stateNotFound',
        function (event, unfoundState, fromState, fromParams) {
            $log.warn('$stateNotFound', {
                event: event,
                unfoundState: unfoundState,
                fromState: fromState,
                fromParams: fromParams
            });
        });

    $rootScope.$on('$stateChangeError',
        function (event, toState, toParams, fromState, fromParams, error) {
            $log.error('$stateChangeError', {
                event: event,
                toState: toState,
                toParams: toParams,
                fromState: fromState,
                fromParams: fromParams,
                error: error
            });
            if (error) {
                throw error;
            }
        });
};
开发者ID:egilsster,项目名称:ionic-webpack-typescript,代码行数:42,代码来源:index.run.ts

示例6:

 const failure = (error: any) => $log.debug('$stateChangeError', { ...details, error });
开发者ID:emjburns,项目名称:deck,代码行数:1,代码来源:stateChange.logger.ts

示例7:

 const suspendScheduler = (): void => {
   this.$log.debug('auto refresh suspended');
   suspended = true;
 };
开发者ID:jcwest,项目名称:deck,代码行数:4,代码来源:scheduler.factory.ts

示例8: function

 function (event, toState) {
     $log.debug('$stateChangeSuccess - name:', toState.name);
 });
开发者ID:egilsster,项目名称:ionic-webpack-typescript,代码行数:3,代码来源:index.run.ts


注:本文中的angular.ILogService.debug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。