Bumps [@angular/core](https://github.com/angular/angular/tree/HEAD/packages/core) from 18.2.13 to 19.0.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/angular/angular/releases"><code>@âangular/core</code>'s releases</a>.</em></p> <blockquote> <h2>v19.0.3</h2> <h1>19.0.3 (2024-12-04)</h1> <h2>v19.0.2</h2> <h1>19.0.2 (2024-12-04)</h1> <h3>compiler-cli</h3> <table> <thead> <tr> <th>Commit</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="9f99196d23"><img src="https://img.shields.io/badge/9f99196d23-fix-green" alt="fix - 9f99196d23" /></a></td> <td>account for multiple generated namespace imports in HMR (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58924">#58924</a>)</td> </tr> </tbody> </table> <h3>core</h3> <table> <thead> <tr> <th>Commit</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="4792db9a6d"><img src="https://img.shields.io/badge/4792db9a6d-fix-green" alt="fix - 4792db9a6d" /></a></td> <td>Explicitly manage TracingSnapshot lifecycle and dispose of it once it's been used. (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58929">#58929</a>)</td> </tr> </tbody> </table> <h3>migrations</h3> <table> <thead> <tr> <th>Commit</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="7b5bacc228"><img src="https://img.shields.io/badge/7b5bacc228-fix-green" alt="fix - 7b5bacc228" /></a></td> <td>class content being deleted in some edge cases (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58959">#58959</a>)</td> </tr> <tr> <td><a href="d1cbdd6acb"><img src="https://img.shields.io/badge/d1cbdd6acb-fix-green" alt="fix - d1cbdd6acb" /></a></td> <td>correctly strip away parameters surrounded by comments in inject migration (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58959">#58959</a>)</td> </tr> <tr> <td><a href="e17ff71c31"><img src="https://img.shields.io/badge/e17ff71c31-fix-green" alt="fix - e17ff71c31" /></a></td> <td>don't migrate classes with parameters that can't be injected (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58959">#58959</a>)</td> </tr> <tr> <td><a href="7c5f990001"><img src="https://img.shields.io/badge/7c5f990001-fix-green" alt="fix - 7c5f990001" /></a></td> <td>inject migration aggressively removing imports (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58959">#58959</a>)</td> </tr> <tr> <td><a href="4392ccedf9"><img src="https://img.shields.io/badge/4392ccedf9-fix-green" alt="fix - 4392ccedf9" /></a></td> <td>inject migration dropping code if everything except super is removed (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58959">#58959</a>)</td> </tr> <tr> <td><a href="9cbebc6dda"><img src="https://img.shields.io/badge/9cbebc6dda-fix-green" alt="fix - 9cbebc6dda" /></a></td> <td>preserve type literals and tuples in inject migrations (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58959">#58959</a>)</td> </tr> </tbody> </table> <h3>platform-server</h3> <table> <thead> <tr> <th>Commit</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="f3c388ecda"><img src="https://img.shields.io/badge/f3c388ecda-fix-green" alt="fix - f3c388ecda" /></a></td> <td>remove peer dependency on animations (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58997">#58997</a>)</td> </tr> </tbody> </table> <h2>v19.0.1</h2> <h1>19.0.1 (2024-11-26)</h1> <h3>compiler-cli</h3> <table> <thead> <tr> <th>Commit</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="fb1fa8b0fc"><img src="https://img.shields.io/badge/fb1fa8b0fc-fix-green" alt="fix - fb1fa8b0fc" /></a></td> <td>more accurate diagnostics for host binding parser errors (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58870">#58870</a>)</td> </tr> </tbody> </table> <h3>core</h3> <table> <thead> <tr> <th>Commit</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="502ee0e722"><img src="https://img.shields.io/badge/502ee0e722-fix-green" alt="fix - 502ee0e722" /></a></td> <td>correctly clear template HMR internal renderer cache (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58724">#58724</a>)</td> </tr> <tr> <td><a href="99715104a1"><img src="https://img.shields.io/badge/99715104a1-fix-green" alt="fix - 99715104a1" /></a></td> <td>correctly perform lazy routes migration for components with additional decorators (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58796">#58796</a>)</td> </tr> <tr> <td><a href="118803035f"><img src="https://img.shields.io/badge/118803035f-fix-green" alt="fix - 118803035f" /></a></td> <td>Ensure _tick is always run within the TracingSnapshot. (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58881">#58881</a>)</td> </tr> <tr> <td><a href="08b9452f01"><img src="https://img.shields.io/badge/08b9452f01-fix-green" alt="fix - 08b9452f01" /></a></td> <td>Ensure resource sets an error (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58855">#58855</a>)</td> </tr> <tr> <td><a href="84f45ea3ff"><img src="https://img.shields.io/badge/84f45ea3ff-fix-green" alt="fix - 84f45ea3ff" /></a></td> <td>make component id generation more stable between client and server builds (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58813">#58813</a>)</td> </tr> <tr> <td><a href="d3491c7cee"><img src="https://img.shields.io/badge/d3491c7cee-fix-green" alt="fix - d3491c7cee" /></a></td> <td>Prevents race condition of cleanup for incremental hydration (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58722">#58722</a>)</td> </tr> </tbody> </table> <h3>forms</h3> <table> <thead> <tr> <th>Commit</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="4dfe5b6cef"><img src="https://img.shields.io/badge/4dfe5b6cef-fix-green" alt="fix - 4dfe5b6cef" /></a></td> <td>work around TypeScript 5.7 issue (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58731">#58731</a>)</td> </tr> </tbody> </table> <h3>language-service</h3> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/angular/angular/blob/main/CHANGELOG.md"><code>@âangular/core</code>'s changelog</a>.</em></p> <blockquote> <h1>19.0.3 (2024-12-04)</h1> <h1>19.1.0-next.1 (2024-12-04)</h1> <h3>compiler-cli</h3> <table> <thead> <tr> <th>Commit</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="f280467398">f280467398</a></td> <td>fix</td> <td>account for multiple generated namespace imports in HMR (<a href="https://redirect.github.com/angular/angular/pull/58924">#58924</a>)</td> </tr> </tbody> </table> <h3>core</h3> <table> <thead> <tr> <th>Commit</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="e894a5daea">e894a5daea</a></td> <td>feat</td> <td>set kind field on template and effect nodes (<a href="https://redirect.github.com/angular/angular/pull/58865">#58865</a>)</td> </tr> <tr> <td><a href="3b765367f3">3b765367f3</a></td> <td>fix</td> <td>Explicitly manage TracingSnapshot lifecycle and dispose of it once it's been used. (<a href="https://redirect.github.com/angular/angular/pull/58929">#58929</a>)</td> </tr> </tbody> </table> <h3>migrations</h3> <table> <thead> <tr> <th>Commit</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="e31e52e177">e31e52e177</a></td> <td>fix</td> <td>class content being deleted in some edge cases (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> <tr> <td><a href="508d3a1b3b">508d3a1b3b</a></td> <td>fix</td> <td>correctly strip away parameters surrounded by comments in inject migration (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> <tr> <td><a href="7191aa6e09">7191aa6e09</a></td> <td>fix</td> <td>don't migrate classes with parameters that can't be injected (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> <tr> <td><a href="a4924af6d5">a4924af6d5</a></td> <td>fix</td> <td>inject migration aggressively removing imports (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> <tr> <td><a href="35165d152d">35165d152d</a></td> <td>fix</td> <td>inject migration dropping code if everything except super is removed (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> <tr> <td><a href="68e5ba7a3a">68e5ba7a3a</a></td> <td>fix</td> <td>preserve type literals and tuples in inject migrations (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> </tbody> </table> <h3>platform-server</h3> <table> <thead> <tr> <th>Commit</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="1cfbfc66d3">1cfbfc66d3</a></td> <td>fix</td> <td>remove peer dependency on animations (<a href="https://redirect.github.com/angular/angular/pull/58997">#58997</a>)</td> </tr> </tbody> </table> <h1>19.0.2 (2024-12-04)</h1> <h3>compiler-cli</h3> <table> <thead> <tr> <th>Commit</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="9f99196d23">9f99196d23</a></td> <td>fix</td> <td>account for multiple generated namespace imports in HMR (<a href="https://redirect.github.com/angular/angular/pull/58924">#58924</a>)</td> </tr> </tbody> </table> <h3>core</h3> <table> <thead> <tr> <th>Commit</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="4792db9a6d">4792db9a6d</a></td> <td>fix</td> <td>Explicitly manage TracingSnapshot lifecycle and dispose of it once it's been used. (<a href="https://redirect.github.com/angular/angular/pull/58929">#58929</a>)</td> </tr> </tbody> </table> <h3>migrations</h3> <table> <thead> <tr> <th>Commit</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href="7b5bacc228">7b5bacc228</a></td> <td>fix</td> <td>class content being deleted in some edge cases (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> <tr> <td><a href="d1cbdd6acb">d1cbdd6acb</a></td> <td>fix</td> <td>correctly strip away parameters surrounded by comments in inject migration (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> <tr> <td><a href="e17ff71c31">e17ff71c31</a></td> <td>fix</td> <td>don't migrate classes with parameters that can't be injected (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> <tr> <td><a href="7c5f990001">7c5f990001</a></td> <td>fix</td> <td>inject migration aggressively removing imports (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> <tr> <td><a href="4392ccedf9">4392ccedf9</a></td> <td>fix</td> <td>inject migration dropping code if everything except super is removed (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> <tr> <td><a href="9cbebc6dda">9cbebc6dda</a></td> <td>fix</td> <td>preserve type literals and tuples in inject migrations (<a href="https://redirect.github.com/angular/angular/pull/58959">#58959</a>)</td> </tr> </tbody> </table> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="0c40bb28e1"><code>0c40bb2</code></a> refactor(docs-infra): convert code-example-s that have only region param to @...</li> <li><a href="5f3ba068f1"><code>5f3ba06</code></a> docs: set syntax highlighting of code examples MD code blocks (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/59026">#59026</a>)</li> <li><a href="b8a2ae01d5"><code>b8a2ae0</code></a> docs: fix missing alert block styles in the API reference (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/59020">#59020</a>)</li> <li><a href="c453f5dc2f"><code>c453f5d</code></a> docs(core): fix eventCoalescing comment (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/57097">#57097</a>)</li> <li><a href="4392ccedf9"><code>4392cce</code></a> fix(migrations): inject migration dropping code if everything except super is...</li> <li><a href="e17ff71c31"><code>e17ff71</code></a> fix(migrations): don't migrate classes with parameters that can't be injected...</li> <li><a href="9cbebc6dda"><code>9cbebc6</code></a> fix(migrations): preserve type literals and tuples in inject migrations (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58959">#58959</a>)</li> <li><a href="7c5f990001"><code>7c5f990</code></a> fix(migrations): inject migration aggressively removing imports (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58959">#58959</a>)</li> <li><a href="d1cbdd6acb"><code>d1cbdd6</code></a> fix(migrations): correctly strip away parameters surrounded by comments in in...</li> <li><a href="7b5bacc228"><code>7b5bacc</code></a> fix(migrations): class content being deleted in some edge cases (<a href="https://github.com/angular/angular/tree/HEAD/packages/core/issues/58959">#58959</a>)</li> <li>Additional commits viewable in <a href="https://github.com/angular/angular/commits/19.0.3/packages/core">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
ng-flutter
This Angular project is a simple example of how Angular and Flutter web apps could be integrated, and have them interop.
Points of Interest
Angular
This repository is a quite standard Angular app. The following changes were made to be able to use (and interop) with a Flutter web application:
package.jsonhas a customprebuildscript that builds the Flutter web app, so Angular can find it later.flutter.jsis added as a"scripts"entry inangular.json. Angular takes care of minimizing and injecting it as any other script.- The rest of the flutter app
flutter/build/web/is registered as an"assets"entry inangular.json, and moved to/flutter. - The
ng-fluttercomponent takes care of embedding Flutter web, and yielding control to Angular through anappLoadedEventEmitter. The object yielded by this emitter is a state controller exposed by flutter via a JS custom event!
Flutter
The embedded Flutter application lives in the flutter directory of this repo.
That application is a standard web app, that doesn't need to be aware that it's
going to be embedded in another framework.
- Flutter uses new
@staticInteropmethods to allow certain Dart functions to be called from JavaScript. - Look at how
createDartExportandbroadcastAppEventwork together to make the_statecontroller of the Flutter app available to Angular!
How to build the app
Requirements
If you want to build and run this demo on your machine, you'll need a moderately recent version of Angular:
$ ng version
Angular CLI: 17.0.0
Node: 20.9.0
Package Manager: npm 10.1.0
OS: linux x64
And Flutter:
$ flutter --version
Flutter 3.13.9 • channel stable
Framework • revision d211f42860 (2 weeks ago) • 2023-10-25 13:42:25 -0700
Engine • revision 0545f8705d
Tools • Dart 3.1.5 • DevTools 2.25.0
Ensure npm, ng and flutter are present in your $PATH.
Building the app
This repository is a moderately standard Angular app. It integrates
Flutter web by making it part of the Angular assets.
In order to build this app, first fetch its npm dependencies:
$ npm install
added 963 packages, and audited 964 packages in 17s
93 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Then run the build script. It'll take care of building Flutter
automatically:
$ npm run build
> ng-flutter@0.0.0 prebuild
... Flutter web build output ...
Compiling lib/main.dart for the Web...
> ng-flutter@0.0.0 build
> ng build
... Angular build output ...
✔ Browser application bundle generation complete.
✔ Copying assets complete.
✔ Index html generation complete.
Local Angular development
Once you've reached this point, you should be able to work with your Angular application normally, for example to run a local web server:
$ npm run start
> ng-flutter@0.0.0 start
> ng serve
✔ Browser application bundle generation complete.
Initial Chunk Files | Names | Raw Size
vendor.js | vendor | 4.38 MB |
... Angular build output...
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
✔ Compiled successfully.
Navigate to http://localhost:4200/. The application will automatically reload
if you change any of its Angular source files.
Local Flutter web development
The Flutter app lives inside the flutter directory, and can be
developed independently. Just do any changes on Flutter web as you'd
normally do. It even includes a small web/index.html so you can see
changes to your app without running the whole Angular setup.
Note
For now, Angular does not auto-detect changes to your Flutter web app, so once you're happy with your Flutter web app, make sure to call
npm run buildso everything rebuilds and gets placed into its correct location.
Deploying the app
After npm run build, you should have a deployable Angular + Flutter
web app in the dist directory of this Angular project.
Your built app can can be deployed anywhere, but do check Firebase hosting for a super-easy deployment experience!
Troubleshooting
Flutter
Ensure your flutter app is properly rebuilt after any changes.
- Run
npm run buildto re-build the Flutter app.
If you encounter error messages like:
Error: Can't resolve 'flutter/build/web/flutter.js' in '/my/checkout/of/ng-flutter'
You definitely need to run npm run build!
Reach out to the team(s)!
Have you had any problem not covered in this README? Do you want to see other embedding examples?
Let us know by creating an issue or opening a new pull request.
Thanks!