0
votes

I was experimenting with how to use the latest Angular-8 for Microsoft office addin.

I followed the following steps:

  • created a new angular project using CLI
  • added the manifest.xml file and updated the paths for task pane
  • Updated the package.json and added office-js, and other debugging liberaries.
  • added ssl for the localhost server.

I side loaded the addin and it works perfectly on Outlook web. I tested on many browsers and I did not find any issues.

However, When i click the addin icon in Outlook Desktop, it opens the taskpane and does not show any content.

I have not shown any configuration in the question. I will updated, Once asked by the relevant expertise.

Below are the screenshots

Outlook web

Outlook web

Outlook Desktop

Outlook desktop

Update:

Angular components are not loading in the outlook desktop add-in. I am using angular 8.

Below is the package.json.

        {
          "name": "temporary-adin",
         "version": "0.0.0",
         "scripts": {
           "ng": "ng",
           "start": "ng serve --ssl true",
           "build": "ng build",
           "test": "ng test",
           "lint": "ng lint",
           "e2e": "ng e2e",
           "start-addin": "office-addin-debugging start manifest.xml",
           "start:desktop": "office-addin-debugging start manifest.xml desktop",
           "start:web": "office-addin-debugging start manifest.xml web",
           "stop": "office-addin-debugging stop manifest.xml",
          "validate": "office-toolbox validate -m manifest.xml"
       },
        "config": {
          "app-to-debug": "outlook",
          "app-type-to-debug": "desktop",
          "dev-server-port": 3000
       },
        "private": true,
        "dependencies": {
        "@angular/animations": "~8.0.1",
        "@angular/common": "~8.0.1",
        "@angular/compiler": "~8.0.1",
        "@angular/core": "~8.0.1",
        "@angular/forms": "~8.0.1",
        "@angular/platform-browser": "~8.0.1",
        "@angular/platform-browser-dynamic": "~8.0.1",
        "@angular/router": "~8.0.1",
        "@microsoft/office-js": "^1.1.23",
        "@microsoft/office-js-helpers": "^1.0.2",
        "office-ui-fabric-js": "^1.5.0",
        "rxjs": "~6.4.0",
        "tslib": "^1.9.0",
        "zone.js": "~0.9.1"
       },
       "devDependencies": {
        "@angular-devkit/build-angular": "~0.800.0",
        "@angular/cli": "~8.0.3",
        "@angular/compiler-cli": "~8.0.1",
        "@angular/language-service": "~8.0.1",
        "@types/jasmine": "~3.3.8",
        "@types/jasminewd2": "~2.0.3",
        "@types/node": "~8.9.4",
        "@types/office-js": "^1.0.11",
        "@types/office-runtime": "^1.0.8",
        "codelyzer": "^5.0.0",
        "jasmine-core": "~3.4.0",
        "jasmine-spec-reporter": "~4.2.1",
        "karma": "~4.1.0",
        "karma-chrome-launcher": "~2.2.0",
        "karma-coverage-istanbul-reporter": "~2.0.1",
        "karma-jasmine": "~2.0.1",
        "karma-jasmine-html-reporter": "^1.4.0",
        "office-addin-debugging": "^2.3.0",
        "office-addin-dev-certs": "^1.2.4",
        "office-toolbox": "^0.1.1",
        "protractor": "~5.4.0",
        "ts-node": "~7.0.0",
        "tslint": "~5.15.0",
        "typescript": "~3.4.3"
      }
     }

Kindly advice. thank you

1

1 Answers

1
votes

Outlook Desktop(2013 or 2016 version) does not support es2015.

Since default behavior in angular is to compile typescript to es2015, It would not load in Outlook desktop.

I had to modify the tsconfig.app.json and add the target to es5.