12/19/2023 0 Comments History of angular versionsThere are a couple things to keep in mind with iOS specifically. We revisited HMR integration and found a number of ways to improve upon it and you should experience better HMR all around. The Angular team added to their roadmap they're looking into making Zone.js opt-out, and we're already working on it to make sure you can use NativeScript zoneless when the time comes! Revamped HMR If you're a plugin developer and you're not using Observable (or if you're overriding Observable's addEventListener) for handling events and callbacks, we also provided an API for you to patch your custom event callbacks in your Angular integrations. This means most plugins that previously required a n are now probably safe to use. We now use the zone.js package as is and provide our own patches for NativeScript APIs. We previously relied on plugin developers and to provide callbacks wrapped inside a ZoneCallback to avoid pesky issues where your views wouldn't update after an event, so many developers had to wrap those callbacks into a n. We no longer provide a custom Zone.js implementation. You can find more information in the Angular docs. Nothing prevents you from bootstrapping your own BackgroundModule that doesn't bootstrap any component, but allows you to use its injector for goodies like HttpClient in a background service! For coordinating between different modules, we recommend using Angular's own providedIn: 'platform', which will allow for a singleton service shared across the whole platform (and its modules)! Just beware that this platform is only destroyed during HMR and you can't use services in it that depend on module providers (so no HttpClient!). What's quite exciting about the new API is you are no longer limited to bootstrapping only UI-based Modules (ya' know like the main AppModule of the entire UI of your app). By using the token APP_ROOT_VIEW, it's also possible to make a module bootstrap in any View, very similar to how web components work! We will discuss how you can provide your own logic for Root View handling in a future blog post. Modules will always bootstrap themselves into a "dummy" NativeScript view that makes the Application's Root View. Since we're also exposing the whole platform, there's no limit for how many modules you can bootstrap. It'll destroy the module on app exit, as it always did, but now you can wire up your own logic as you're the one passing the NgModuleRef. This new function will handle launch and exit events and ask you to bootstrap your main app when it's needed. The full scope of package.json versions you can expect to be using are: "dependencies" : ) The TSC decided to approach this new major version holistically taking into account from the bottom up all the latest advancements around the Angular framework. We are excited to release NativeScript for Angular 12 as it is packed with refreshments including a completely revamped engine under the hood.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |