2017-06-30 3 views
1

wenn ich versuche, öffnen Sie ein Popup in Outlook.Ich bekomme Office.Context.mailbox undefined in Pop-up-Controller.Aber ich habe Office-Objekt in Controller.Bitte schlagen Sie vor. Code ist unteroffice.context.mailbox ist undefined

(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); 
 
    } 
 
} 
 
})();

+1

Hast du "Office.initialize" in der Pop-up-Seite aufrufen? –

+0

Ja, ich habe Büro in Pop-up-Seite initialisiert. – Leo

Antwort

1

Sie nicht die meisten Funktionen in einem Pop-up durch den Dialog API gestartet zugreifen kann, und ich sehe keinen Grund, es funktionieren würde, wenn Sie entweder window.open verwendet.

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