office.context.mailbox 未定义
office.context.mailbox is undefined
当我尝试在 outlook.i 中打开一个弹出窗口时,我在弹出窗口 office.context.mailbox 中得到了未定义 controller.But 我在 controller.Please suggest.Code 中得到了 office 对象低于
(function() {
'use strict';
angular.module('wpoffice')
.component('externalTrack',
templateUrl: 'app/components/externalTrack/external-track_template.html',
controller: ExternalTrackController,
bindings: {}
});
/** ngInject*/
function ExternalTrackController($rootScope, $scope, $timeout, appData, ngNotify,$q,trackingService) {
var self = this;
self.$onInit = activate;
function activate() {
console.log(Office)
console.log(Office.context.mailbox);
}
}
})();
您无法访问由对话框 API 启动的弹出窗口中的大多数功能,我认为如果您使用 window.open 也没有理由它会起作用。
The messageParent function is one of only two Office APIs that can be called in the dialog box. (The other is Office.context.requirements.isSetSupported)
Dialog API docs
当我尝试在 outlook.i 中打开一个弹出窗口时,我在弹出窗口 office.context.mailbox 中得到了未定义 controller.But 我在 controller.Please suggest.Code 中得到了 office 对象低于
(function() {
'use strict';
angular.module('wpoffice')
.component('externalTrack',
templateUrl: 'app/components/externalTrack/external-track_template.html',
controller: ExternalTrackController,
bindings: {}
});
/** ngInject*/
function ExternalTrackController($rootScope, $scope, $timeout, appData, ngNotify,$q,trackingService) {
var self = this;
self.$onInit = activate;
function activate() {
console.log(Office)
console.log(Office.context.mailbox);
}
}
})();
您无法访问由对话框 API 启动的弹出窗口中的大多数功能,我认为如果您使用 window.open 也没有理由它会起作用。
The messageParent function is one of only two Office APIs that can be called in the dialog box. (The other is Office.context.requirements.isSetSupported)
Dialog API docs