本文整理汇总了TypeScript中angular.element类的典型用法代码示例。如果您正苦于以下问题:TypeScript element类的具体用法?TypeScript element怎么用?TypeScript element使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了element类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1:
angular.element(document).ready(() => {
// common settings promise:
var commonQuerySettingsPromise = IzendaCommonLoader.loadSettings();
// instant report settings promise:
var urlSettings = window.urlSettings$;
var rsPageUrl = urlSettings.urlRsPage;
var settingsUrl = rsPageUrl + '?wscmd=getDashboardSettings';
var dashboardsSettingsPromise = angular.element.get(settingsUrl);
// wait while all settings are loaded:
angular.element
.when(commonQuerySettingsPromise, dashboardsSettingsPromise)
.then((commonSettingsResult, dashboardsSettingsResult) => {
// get instant report config object
var configObject = dashboardsSettingsResult[0];
// create and configure modules:
IzendaDashboardsLoader.configureModules(configObject);
// bootstrap application:
angular.bootstrap('#izendaDashboardMainContainer', ['izendaDashboard']);
});
});
开发者ID:izenda,项目名称:resources,代码行数:25,代码来源:module-definition.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
$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
示例4: loadSettings
static loadSettings() {
const deferredObject = angular.element.Deferred();
const urlSettings = window.urlSettings$;
const rsPageUrl = urlSettings.urlRsPage;
const settingsUrl = rsPageUrl + '?wscmd=getCommonSettings';
// load common settings:
angular.element.get(settingsUrl, (configJson) => {
var configObject = configJson as IIzendaCommonSettings;
angular
.module('izenda.common.core')
.constant('$izendaCommonSettings', configObject);
deferredObject.resolve();
});
return deferredObject.promise();
}
开发者ID:izenda,项目名称:resources,代码行数:16,代码来源:common-module-definition.ts
示例5: 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
示例6: 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
示例7: 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
注:本文中的angular.element类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论