本文整理汇总了TypeScript中angular.element.get方法的典型用法代码示例。如果您正苦于以下问题:TypeScript element.get方法的具体用法?TypeScript element.get怎么用?TypeScript element.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular.element
的用法示例。
在下文中一共展示了element.get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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']);
});
});
示例2: 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();
}