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


TypeScript element.each方法代码示例

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


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

示例1: function

			$scope.$watchCollection('$izendaInstantReportStorageService.getAllFieldsInActiveTables(true)', function (newActiveFields) {
				// add:
				var countOfChanges = 0;
				angular.element.each(newActiveFields, function () {
					var newActiveField = this;
					var found = false;
					angular.element.each(vm.activeFields, function () {
						if (this.sysname === newActiveField.sysname)
							found = true;
					});
					if (!found) {
						vm.activeFields.push(newActiveField);
						countOfChanges++;
					}
				});
				// remove:
				var i = 0;
				while (i < vm.activeFields.length) {
					var field = vm.activeFields[i];
					var found = false;
					for (var j = 0; j < newActiveFields.length; j++) {
						if (newActiveFields[j].sysname === field.sysname)
							found = true;
					}
					if (!found) {
						vm.activeFields.splice(i, 1);
						countOfChanges++;
					} else
						i++;
				}
				$izendaInstantReportPivotService.syncPivotState(vm.activeFields);
			});
开发者ID:izenda,项目名称:resources,代码行数:32,代码来源:instant-report-pivot-controller.ts

示例2: function

			$scope.$watchCollection('$izendaInstantReportStorageService.getAllFieldsInActiveTables(true)', function (newActiveFields) {
				// sync collection elements:
				// add:
				angular.element.each(newActiveFields, function () {
					var newActiveField = this;
					if (!newActiveField.allowedInFilters)
						return;
					var found = false;
					angular.element.each(vm.activeFields, function () {
						if (this === newActiveField)
							found = true;
					});
					if (!found)
						vm.activeFields.push(newActiveField);
				});
				// remove:
				var i = 0;
				while (i < vm.activeFields.length) {
					var field = vm.activeFields[i];
					var found = false;
					for (var j = 0; j < newActiveFields.length; j++) {
						if (newActiveFields[j] === field)
							found = true;
					}
					if (!found)
						vm.activeFields.splice(i, 1);
					else
						i++;
				}
			});
开发者ID:izenda,项目名称:resources,代码行数:30,代码来源:instant-report-filters-controller.ts

示例3: function

			vm.allActiveFields = angular.element.grep(vm.allActiveFields, function (f: any) {
				var found = false;
				angular.element.each(vm.drillDownFields, function () {
					var ddField = this;
					if (ddField.id === f.id)
						found = true;
				});
				return !found;
			});
开发者ID:izenda,项目名称:resources,代码行数:9,代码来源:instant-report-format-controller.ts

示例4: function

			$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,代码行数:9,代码来源:instant-report-data-source-controller.ts

示例5: function

		vm.prepareConfig = function () {
			if (!angular.isObject(vm.visualizationConfig))
				return;
			if (!angular.isArray(vm.visualizationConfig.categories))
				return;
			angular.element.each(vm.visualizationConfig.categories, function (iCategory: number, category: any) {
				category.opened = iCategory === 0;
			});
		};
开发者ID:izenda,项目名称:resources,代码行数:9,代码来源:instant-report-charts-controller.ts


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