I have developing an Excel add-in by mean-stack
. Long time ago, I saw an answer somewhere about starting up an AngularJS add-in with office.js
(unfortunately I cannot find the thread anymore). The following solution was suggested, though I don't remember what the initial problem was:
Office.initialize = function (reason) {
jQuery(document).ready(function () {
angular.bootstrap(document, ['app'])
})
}
Now, I try to write <html ng-app="app">
and NOT use the above block (that allows me to lazy-load office.js
). So far, it seems the add-in works as well.
So does anyone know if the <html ng-app="app">
way has any potential risk for an Excel add-in? Office.initialize
is not mandatory, right?
Edit 1: I just realized that it did not work well in all the cases, here is the problem: Starting up an Excel add-in with ocLazyLoad failed in Excel for Windows.