Reputation: 171
when i am trying open a pop up in outlook.i am getting office.context.mailbox undefined in pop up controller.But i got office object in controller.Please suggest.Code is below
(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);
}
}
})();
Upvotes: 0
Views: 1378
Reputation: 2469
You can't access most functions in a pop up launched by the dialog API and I see no reason it would work if you used window.open either.
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
Upvotes: 1