You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: reimplement NativeScriptAnimationsModule to be compliant with the new NG Animations' API
* fix(page-router-outlet): don't run change detection every time an outlet is activated
* refactor: separate NativeScriptCommonModule from NativeScriptModule
All common providers, such as CommonModule (from @angular/common), Frame, Page, Device and Modals are moved from NativeScriptModule to NativeScriptCommonModule. The NativeScript module now provides only essential parts such as Renderer and ModuleLoader. It also re-exports the NativeScriptCommonModule.
It can be required from "nativescript-angular/common". The NativeScriptRouterModule also
Reason:
Importing NativeScriptModule more than once causes reinstantiating of
the NativeScriptRenderer, which breaks animations.
BREAKING CHANGES:
NativeScriptModule should be imported only in the root application
module (usually named AppModule).
ApplicationModule.
All other NgModules in the app (both feature and lazy-loaded ones)
should import the NativeScriptCommonModule instead.
The behaviour is alligned with BrowserModule and CommonModule in web
Angular apps. angular.io/guide/ngmodule-faq#q-browser-vs-common-module
Migration steps:
In all NgModules, instead of the root one, replace:
```
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
…
@NgModule({
imports: [
NativeScriptModule,
]
…
})
```
with:
```
import { NativeScriptCommonModule } from "nativescript-angular/common";
…
@NgModule({
imports: [
NativeScriptCommonModule,
]
…
})
0 commit comments