After using angular-cli to create a new project, I integrated ng-office-ui-fabric and its dependencies. I included in index.html, added polyfills to angular.json, and everything seemed to be working smoothly.
When testing the add-in in Word, the taskpanes I created were loading and functioning as expected. However, there is a function-file in the manifest that allows a button on the ribbon to directly call a JavaScript function from the function-file.html. While I could include a JS and HTML file as assets in the project, I preferred to code in TypeScript rather than JavaScript. My attempt to define the functions within a component page of the project and reference it in the manifest as the functionfile did not yield the desired results.
So my inquiry is this: If office.js can call a JavaScript function from a separate HTML file, how can I achieve the same functionality with a routed Angular page containing TypeScript-written components? Do I need to export the function somewhere? Could the issue be related to late loading? Why isn't it working as expected? Would defining these functions in main.ts resolve the problem?