当我尝试在视图中打开一个弹出时。我在弹出office.context.mailbox中得到未定义的controller.But,我在controller.Please中得到了object如下所示
(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);
}
}
})();
发布于 2017-07-01 17:30:51
您无法在对话框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) 对话框API文档
https://stackoverflow.com/questions/44845349
复制相似问题