当前位置: 首页>>代码示例>>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;未经允许,请勿转载。