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


TypeScript angular.isNumber函數代碼示例

本文整理匯總了TypeScript中angular.isNumber函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript isNumber函數的具體用法?TypeScript isNumber怎麽用?TypeScript isNumber使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了isNumber函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: findInDatasources

	/**
	 * Search fields in datasources (returns range of values [from, to])
	 */
	findInDatasources(searchString, from, to) {
		let params = [encodeURIComponent(searchString)];
		if (angular.isNumber(from) && angular.isNumber(to))
			params = params.concat(String(from), String(to));
		return this.$izendaRsQueryService.query('findfields', params, {
			dataType: 'json'
		}, {
				handler: sString => `Failed to search fields and tables by keyword: ${sString}`,
				params: [searchString]
			});
	}
開發者ID:izenda,項目名稱:resources,代碼行數:14,代碼來源:instant-report-query.ts

示例2: setTimeoutTime

 setTimeoutTime(seconds: number): void {
   if (angular.isNumber(seconds) && seconds >= 0) {
     this.options.timeout = seconds;
   } else {
     throw new Error("Timeout time must be a positive integer in seconds or 0 to disable it.");
   }
 }
開發者ID:Kurtz1993,項目名稱:angular-idle-service,代碼行數:7,代碼來源:idle.provider.ts

示例3: PuiIdleValidate

export function PuiIdleValidate($interval: angular.IIntervalService): angular.IDirective {
  return {
    restrict: 'A',
    scope: {
      idleValidate: '&',
      idleValidateKeypress: '&',
      idleValidateMsec: '<'
    },
    link($scope: IdleValidateScope, $element) {
      let intervalTimer: angular.IPromise<any>;
      let milliseconds = $scope.idleValidateMsec;
      if (!angular.isNumber($scope.idleValidateMsec)) {
        milliseconds = 1000;
      }

      $element.bind('keyup', () => {
        if (angular.isFunction($scope.idleValidateKeypress)) {
          $scope.$apply($scope.idleValidateKeypress);
        }

        if (angular.isDefined(intervalTimer)) {
          $interval.cancel(intervalTimer);
        }

        intervalTimer = $interval(() => $scope.idleValidate(), milliseconds, 1);
      });
    }
  };
}
開發者ID:ermshiperete,項目名稱:web-languageforge,代碼行數:29,代碼來源:pui-idle-validate.directive.ts

示例4: return

 return (target: any, key?: string, index?: number): void => {
     if (angular.isNumber(index)) {
         target.$inject = target.$inject || [];
         target.$inject[index] = args[0];
     } else {
         target.$inject = args;
     }
 };
開發者ID:hcacha,項目名稱:angular-oryx-editor,代碼行數:8,代碼來源:common-decorators.ts

示例5: return

 return (target: any, key?: string, index?: number): void => {
   if (angular.isNumber(index)) {
     target.$inject = target.$inject || [];
     target.$inject[index] = typeof args[0] === 'function' ? (args[0] as any).name : args[0];
   } else {
     target.$inject = args;
   }
 };
開發者ID:luisvt,項目名稱:ngts-annotations,代碼行數:8,代碼來源:at-angular.ts

示例6: function

		vm.removeColumn = function (field) {
			if (!angular.isNumber(field.parentFieldId)) {
				// if it is not multiple column for one database field.
				$izendaInstantReportStorageService.applyFieldChecked(field).then(function () {
					var selectedField = $izendaInstantReportStorageService.getCurrentActiveField();
					if (selectedField === field)
						$izendaInstantReportStorageService.applyFieldSelected(field, false);
					vm.updateReportSetValidationAndRefresh();
					$scope.$applyAsync();
				});
			} else {
				var parentField = $izendaInstantReportStorageService.getFieldById(field.parentFieldId);
				$izendaInstantReportStorageService.removeAnotherField(parentField, field);
				vm.updateReportSetValidationAndRefresh();
				$scope.$applyAsync();
			}
		};
開發者ID:izenda,項目名稱:resources,代碼行數:17,代碼來源:instant-report-controller.ts

示例7: refreshDashboard

	/**
	 * Refresh all dashboard tiles (without reloading)
	 * @param {number} intervalIndex auto refresh interval index. Automatic refresh will turn on if this argument is set.
	 */
	refreshDashboard(intervalIndex) {
		this.$izendaDashboardStorageService.refreshDashboard(false, false);
		if (!this.autoRefresh)
			return;
		if (angular.isNumber(intervalIndex)) {
			this.cancelRefreshInterval();
			const selectedInterval = this.autoRefresh.intervals[intervalIndex];
			selectedInterval.selected = true;
			let intervalValue = selectedInterval.value;
			if (intervalValue >= 1) {
				intervalValue *= 1000;
				this.refreshInterval = setInterval(
					() => this.$izendaDashboardStorageService.refreshDashboard(false, false),
					intervalValue);
			}
		}
	}
開發者ID:izenda,項目名稱:resources,代碼行數:21,代碼來源:toolbar-component.ts


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