-->

Outlook add in not work with Angular routing under

2019-08-23 09:54发布

问题:

After updated to latest Mac OS (High Sierra 10.13.1), our outlook web add in not function properly, the page is blank, the reason is the url specified in the add-in manifest is not matched by angular route which is further caused by a wrong manipulated url.

The url I specified in the manifest is

https://localhost:4004/#!/main/viewschedule

But the actual I got from window.location.href is:

https://localhost:4004/?_host_Info=Outlook$Mac$16.01$en-US%23!/main/viewschedule 

Please note %23 in the url above, that means character '#' has been encoded to %23 which lead angular route does not match routes defined in my application.

We use Angular 1.6, outlook on Mac is 15.40.

We tried to enable html5 mode for angular routing described here. However it looks like outlook office.js could set window.history.pushState to null during its loading. And that history api is a dependence for html5 mode of angular routing.

Question is how can I fix it, can I look forward a future release of outlook to fix this problem?