1

I am working on create a Outlook Add-in using Angular. For a sample i added task pane button to open up a side panel in outlook. After index page loading its open another component.

Problem is angular component not loading in Outlook 2016 mac, but it works Firefox, Chrome, Safari browsers.

How would you recommend carrying out such a problem?

Note : I have tested outlook on mac with Vorlon. Office.intialize not loading and got folllowing console messages.

  1. Attempting to configure 'userAgent' with descriptor '{}' on object '[object Navigator]' and got error, giving up: TypeError: Attempting to change the getter of an unconfigurable property.
  2. Attempting to configure 'appVersion' with descriptor '{}' on object '[object Navigator]' and got error, giving up: TypeError: Attempting to change the getter of an unconfigurable property.
  3. Attempting to configure 'appName' with descriptor '{}' on object '[object Navigator]' and got error, giving up: TypeError: Attempting to change the getter of an unconfigurable property.
  4. Attempting to configure 'product' with descriptor '{}' on object '[object Navigator]' and got error, giving up: TypeError: Attempting to change the getter of an unconfigurable property.
  5. Attempting to configure 'vendor' with descriptor '{}' on object '[object Navigator]' and got error, giving up: TypeError: Attempting to change the getter of an unconfigurable property.

And also I published the addin and checked F12 to console messages in Outlook on windows. getting an error message "SCRIPT5022: Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function."

This is my main.ts file

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
  enableProdMode();
}

declare let Office:any;

Office.initialize = (reason: any) => {
  console.log('SampleAddin: initalizing office.js...');

  // bootstrap
  platformBrowserDynamic().bootstrapModule(AppModule)
    .then((success: any) => {
      console.log('SampleAddin: bootstrap success', success);
    })
    .catch((error: any) => {
      console.log('SampleAddin: bootstrap error', error);
    });
};
5
  • Are you receiving any errors? Commented Aug 25, 2017 at 16:19
  • @MarcLaFleur-MSFTnot getting any error it just loaded index page, not rendered the angular component in outlook Mac Commented Aug 25, 2017 at 16:29
  • Have you set up Vorlon so you can see the console messages? Debugging with Vorlon.JS Commented Aug 25, 2017 at 16:32
  • Thanks, I tried, but i think dint test Vorlon with https. I will try. Do you have experience on Angular 2 add-in in mac? Is it works fine? Commented Aug 25, 2017 at 16:51
  • Many add-ins use Angular. Add-ins do require HTTPS, you cannot use them (even in dev) over HTTP. Commented Aug 26, 2017 at 0:24

1 Answer 1

1

Without an error/warning, it is difficult to identify what might be going on. I'd recommend looking at the following resources:

  1. Tips for creating Office Add-ins with Angular

  2. Debug Office Add-ins on iPad and Mac

  3. OfficeDev/script-lab (OSS Word/Ppt/Excel Add-in using Angular)

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your suggestions. I have edited question with console log messages in outlook on mac. These log messages only shows in outlook mac.
I got error saying Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function. I have updated question with main.ts file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.