Deploying your app
To run in any modern browser, your Angular app has to be compiled to minimal JavaScript. Minimal means tree-shaken (so that unused code is left out) and minified (shortening of names and minimum use of spaces).
But first, test your app in other browsers by performing the following steps:
- First, test in your default browser by right-clicking on the startup web page and selecting Run as JavaScript. This will compile to JavaScript and execute the app in the browser, but the compiled code will be kept in memory and not written to disk.
- To change browsers, go to the menu-item and navigate to Tools | Preferences | Run | Debug, uncheck Use system default browser, and select the other browser. You can also just start that browser and copy the URL from the app in your default browser.
How to do it...
- Include the Angular transformer into the app's
pubspec.yaml
file:transformers: - angular
- Also, add the
js
andshadow_dom
packages to yourpubspec.yaml
file. - Add the shadow DOM script...