當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript angular.ILogService類代碼示例

本文整理匯總了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);
   }
 };
開發者ID:mizzy,項目名稱:deck,代碼行數:11,代碼來源:replace.filter.ts

示例2: function

 function (event, unfoundState, fromState, fromParams) {
     $log.warn('$stateNotFound', {
         event: event,
         unfoundState: unfoundState,
         fromState: fromState,
         fromParams: fromParams
     });
 });
開發者ID:egilsster,項目名稱:ionic-webpack-typescript,代碼行數:8,代碼來源:index.run.ts

示例3: 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

示例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));
    }
開發者ID:jchandra74,項目名稱:angular1.5-typescript-jspm-starter-kit,代碼行數:8,代碼來源:app.component.ts

示例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();
  }
開發者ID:lunches-platform,項目名稱:fe,代碼行數:10,代碼來源:basket.ts

示例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));
   }
 };
開發者ID:jcwest,項目名稱:deck,代碼行數:10,代碼來源:scheduler.factory.ts

示例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;
    });
開發者ID:mizzy,項目名稱:deck,代碼行數:10,代碼來源:securityGroupReader.service.ts

示例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")
        );
    }
開發者ID:jchandra74,項目名稱:angular1.5-typescript-jspm-starter-kit,代碼行數:15,代碼來源:app.component.ts

示例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);
  });
開發者ID:jcwest,項目名稱:deck,代碼行數:15,代碼來源:stateChange.logger.ts


注:本文中的angular.ILogService類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。