• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript angular.isString函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中angular.isString函数的典型用法代码示例。如果您正苦于以下问题:TypeScript isString函数的具体用法?TypeScript isString怎么用?TypeScript isString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了isString函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: function

    var load = function (file) {
      if (!file || (!angular.isString(file.prefix) || !angular.isString(file.suffix))) {
        throw new Error('Couldn\'t load static file, no prefix or suffix specified!');
      }

      var fileUrl = [
        file.prefix,
        options.key,
        file.suffix
      ].join('');

      if (angular.isObject(options.fileMap) && options.fileMap[fileUrl]) {
        fileUrl = options.fileMap[fileUrl];
      }

      return $http(angular.extend({
        url: fileUrl,
        method: 'GET',
        headers: {'Cache-Control': 'no-cache', 'Pragma': 'no-cache'},
        silentCall: true
      }, options.$http))
        .then(function(result) {
          return result.data;
        }, function () {
          return $q.reject(options.key);
        });
    };
开发者ID:gravitee-io,项目名称:gravitee-management-webui,代码行数:27,代码来源:loader.ts


示例2: _saveReportWithGivenName

		/**
		 * Save report with selected name
		 */
		function _saveReportWithGivenName(reportName, reportCategory) {
			var category = reportCategory;
			if (!angular.isString(category) || category.toLowerCase() === UNCATEGORIZED.toLowerCase())
				category = '';

			var rsReportName = reportName;
			if (angular.isString(reportCategory) && reportCategory !== '')
				rsReportName = reportCategory + $izendaSettingsService.getCategoryCharacter() + rsReportName;

			var savePromise;
			if (angular.isString(reportName) && reportName !== '') {
				savePromise = $izendaInstantReportStorageService.saveReportSet(reportName, category);
			} else {
				savePromise = $izendaInstantReportStorageService.saveReportSet();
			}
			savePromise.then(function () {
				var notificationMessage = $izendaLocaleService.localeTextWithParams('js_ReportSaved', 'Report "{0}" sucessfully saved.', [rsReportName]);
				$izendaUtilUiService.showNotification(notificationMessage);
			}, function (error) {
				var errorTitle = $izendaLocaleService.localeText('js_FailedSaveReportTitle', 'Report save error');
				var errorMessage = $izendaLocaleService.localeTextWithParams(
					'js_FailedSaveReport',
					'Failed to save report "{0}". Error description: {1}',
					[rsReportName, error]);
				$izendaUtilUiService.showErrorDialog(errorMessage, errorTitle);
			});
		}
开发者ID:izenda,项目名称:resources,代码行数:30,代码来源:instant-report-controller.ts


示例3: eventLogger

 function eventLogger(event, to, toParams, from, fromParams) {
   if (logEvents && angular.isFunction(to.to)) {
     const transition = to;
     log += event.name + '(' + transition.to().name + ',' + transition.from().name + ');';
   } else if (logEvents) {
     log +=
       event.name +
       '(' +
       (angular.isString(to.name) ? to.name : to) +
       ',' +
       (angular.isString(from.name) ? from.name : from) +
       ');';
   }
 }
开发者ID:angular-ui,项目名称:ui-router,代码行数:14,代码来源:stateEventsSpec.ts


示例4: function

 var extractValueToCompare = function (item: any) {
     if (angular.isObject(item) && angular.isString(filterOn)) {
         return item[filterOn];
     } else {
         return item;
     }
 };
开发者ID:prashanthc97,项目名称:kylo,代码行数:7,代码来源:filters.ts


示例5: function

		vm.runSearchQuery = function (clearResults) {
			if (vm.searchQueryRunning)
				return;
			if (!angular.isString(vm.searchString) || vm.searchString.trim() === '') {
				vm.searchPanelOpened = false;
				vm.searchQueryRunning = false;
				return;
			}
			vm.searchQueryRunning = true;
			var count = 50;
			if (clearResults) {
				vm.searchResults = [];
				previousResultsCount = null;
				angular.element('#izInstDataSourcesTree').get(0).scrollTop = 0;
			}
			if (previousResultsCount === 0) {
				vm.searchQueryRunning = false;
				return;
			}
			$izendaInstantReportStorageService.searchInDataDources(vm.searchString, vm.searchResults.length, vm.searchResults.length + count - 1).then(function (searchResults) {
				previousResultsCount = searchResults.length;
				angular.element.each(searchResults, function () {
					vm.searchResults.push(this);
				});
				vm.searchPanelOpened = true;
				$scope.$applyAsync();
				vm.searchQueryRunning = false;
			});
		};
开发者ID:izenda,项目名称:resources,代码行数:29,代码来源:instant-report-data-source-controller.ts


示例6:

 model:  ($transition$: any, DomainTypesService: any)=> {
     if (angular.isString($transition$.params().domainTypeId)) {
         return DomainTypesService.findById($transition$.params().domainTypeId);
     } else {
         return DomainTypesService.newDomainType();
     }
 },
开发者ID:prashanthc97,项目名称:kylo,代码行数:7,代码来源:module.ts


示例7: ExtendReportExport

		return this.$q((resolve, reject) => {
			try {
				var printUrl = `${this.$izendaUrlService.settings.urlRsPage}?p=htmlreport&print=1`;
				// print single tile if parameter is set:
				if (angular.isString(reportForPrint) && reportForPrint !== '')
					printUrl += `&reportPartName=${encodeURIComponent(reportForPrint)}`;

				// izpid and anpid will be added inside the ExtendReportExport method 
				this.$timeout(() => {
					let newWindow = ExtendReportExport(responseServer.OpenUrl, printUrl, 'aspnetForm', '', '', true);
					if ('WebkitAppearance' in document.documentElement.style) {
						let intervalId = this.$interval(() => {
							if (!newWindow || newWindow.closed) {
								this.$interval.cancel(intervalId);
								intervalId = null;
								resolve();
							}
						}, 500);
					} else {
						resolve();
					}
				}, 500);
			} catch (e) {
				console.error(e);
				reject(e);
			}
		});
开发者ID:izenda,项目名称:resources,代码行数:27,代码来源:dashboard-storage-service.ts


示例8: response

 function response (response) {
     var alertKey = response.headers('X-angular2UaaGatewayApp-alert');
     if (angular.isString(alertKey)) {
         //AlertService.success(alertKey, { param : response.headers('X-angular2UaaGatewayApp-params')});
     }
     return response;
 }
开发者ID:xetys,项目名称:jhipster-uaa-setup,代码行数:7,代码来源:notification.interceptor.ts


示例9: function

		vm.addFieldToReport = function (fieldSysName) {
			if (!angular.isString(fieldSysName))
				return;
			var field = $izendaInstantReportStorageService.getFieldBySysName(fieldSysName, true);
			if (field.checked) {
				var anotherField = $izendaInstantReportStorageService.addAnotherField(field, true);
				$izendaInstantReportStorageService.applyFieldChecked(anotherField).then(function () {
					vm.updateReportSetValidationAndRefresh();
					$scope.$applyAsync();
				});
			} else {
				$izendaInstantReportStorageService.unselectAllFields();
				field.selected = true;
				$izendaInstantReportStorageService.setCurrentActiveField(field);
				$izendaInstantReportStorageService.applyFieldChecked(field).then(function () {
					vm.updateReportSetValidationAndRefresh();
					$scope.$applyAsync();
				});
			}
			// move field from last postions to selected position if it is drag-n-drop:
			if (field.checked && vm.currentInsertColumnOrder >= 0) {
				var fieldsArray = $izendaInstantReportStorageService.getAllVisibleFields().slice();
				fieldsArray = angular.element.grep(fieldsArray, function (f: any) {
					return !f.isVgUsed;
				});
				fieldsArray.sort(function (a, b) {
					return a.order - b.order;
				});
				var from = fieldsArray.length - 1;
				var to = vm.currentInsertColumnOrder;
				$izendaInstantReportStorageService.moveFieldToPosition(from, to, false, true);
			}
			vm.currentInsertColumnOrder = -1;
		};
开发者ID:izenda,项目名称:resources,代码行数:34,代码来源:instant-report-controller.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript angular.isUndefined函数代码示例发布时间:2022-05-28
下一篇:
TypeScript angular.isObject函数代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap