-
-
Notifications
You must be signed in to change notification settings - Fork 241
docs: version bumped to 5.3.0 #1267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,137 @@ | ||
<a name="5.3.0"></a> | ||
# [5.3.0](https://github.com/NativeScript/nativescript-angular/compare/5.2.0...v5.3.0) (2018-04-10) | ||
|
||
> This version requires NativeScript 4.0. | ||
|
||
### Bug Fixes | ||
|
||
* **animations:** provide fake document object in both AoT and JiT mode ([#1164](https://github.com/NativeScript/nativescript-angular/issues/1164)) ([040e0e3](https://github.com/NativeScript/nativescript-angular/commit/040e0e3)), closes [#1163](https://github.com/NativeScript/nativescript-angular/issues/1163) | ||
* App crashes on restart in android ([#1261](https://github.com/NativeScript/nativescript-angular/issues/1261)) ([331b878](https://github.com/NativeScript/nativescript-angular/commit/331b878)) | ||
|
||
|
||
### Features | ||
|
||
* NS 4.0 Integration ([#1250](https://github.com/NativeScript/nativescript-angular/issues/1250)) ([f84fbdc](https://github.com/NativeScript/nativescript-angular/commit/f84fbdc)) | ||
* prevent core modules from getting loaded multiple times ([#1196](https://github.com/NativeScript/nativescript-angular/issues/1196)) ([010fed7](https://github.com/NativeScript/nativescript-angular/commit/010fed7)) | ||
|
||
|
||
### BREAKING CHANGES | ||
|
||
#### Importing `NativeScriptModule` and `NativeScriptAnimationsModule` in multiple ngModules is no longer allowed. | ||
|
||
To migrate: | ||
* in `AppModule`: | ||
* import `NativeScriptModule` | ||
* import`NativeScriptAnimationsModule` - only if you are planning to use Angular Animations | ||
* in the remaining modules: | ||
* remove `NativeScriptModule` imports and replace with `NativeScriptCommonModule` import | ||
* remove `NativeScriptAnimationsModule` imports | ||
|
||
BEFORE: | ||
|
||
app.module.ts: | ||
``` | ||
import { NativeScriptModule } from 'nativescript-angular/nativescript.module'; | ||
import { NativeScriptAnimationsModule } from 'nativescript-angular/animations'; | ||
... | ||
@NgModule({ | ||
imports: [ | ||
NativeScriptModule, | ||
NativeScriptAnimationsModule | ||
], | ||
... | ||
}) | ||
``` | ||
|
||
another.module.ts: | ||
``` | ||
import { NativeScriptModule } from 'nativescript-angular/nativescript.module'; | ||
import { NativeScriptAnimationsModule } from 'nativescript-angular/animations'; | ||
... | ||
@NgModule({ | ||
imports: [ | ||
NativeScriptModule, | ||
NativeScriptAnimationsModule | ||
], | ||
... | ||
}) | ||
``` | ||
|
||
AFTER: | ||
|
||
app.module.ts: | ||
``` | ||
import { NativeScriptModule } from 'nativescript-angular/nativescript.module'; | ||
import { NativeScriptAnimationsModule } from 'nativescript-angular/animations'; | ||
... | ||
@NgModule({ | ||
imports: [ | ||
NativeScriptModule, | ||
NativeScriptAnimationsModule | ||
], | ||
... | ||
}) | ||
``` | ||
|
||
another.module.ts: | ||
``` | ||
import { NativeScriptCommonModule } from 'nativescript-angular/common'; | ||
... | ||
@NgModule({ | ||
imports: [ | ||
NativeScriptCommonModule | ||
], | ||
... | ||
}) | ||
``` | ||
|
||
#### NativeScript 4.0 Compatible Bootstrap and Navigation | ||
NativeScript 4.0 allows you to put any view as the root(not only Frame) of the application. To support in angular projects we had to introduce some changes in how A{N}gular apps are bootstrapped. | ||
|
||
PREVIOUS BEHAVIOR | ||
|
||
Bootstrap creates a root `Frame` and initial `Page`. Then it bootstraps the angular application inside this page. Navigation with `<page-router-outlet>` will always navigate in the `Frame` created by the bootstrap. | ||
|
||
Limitations: | ||
- You cannot change the root view of the app (to `RadSideDrawer` for example). It is always the `Frame` created by the bootstrap. | ||
- You can have only one `<page-router-outlet>` as there is only one `Frame`. | ||
- You always have a `Page` view wrapping your components and you can always. Because the `ActionBar` is part of that `Page` you can always change it with the `<ActionBar>` component. | ||
|
||
NEW BEHAVIOR | ||
|
||
Bootstrap will **not** create root view by default. It will use the root view of your main application component as the root view of the application. The `<page-router-outlet>` component will create its own `Frame` and will use it for navigation. It will also wrap the components you navigate to in a `Page` and will navigate to it as it did before. | ||
|
||
Which means: | ||
|
||
- You can use any view for application root. Finally, you can have application-wide `RadSideDrawer`. | ||
|
||
- You have more flexibility over where to place the `<page-router-outlet>`, you can even have more than one for more advanced scenarios. | ||
|
||
- If you **don't use `<page-router-outlet>`** in your app you will not get the default `Page` and `Frame`, which means you will not be able to inject them in you components or show the `ActionBar`. There is special `createFrameOnBootstrap` option you can pass on bootstrap to make things as _before_: | ||
``` | ||
platformNativeScript({ createFrameOnBootstrap: true }) | ||
.bootstrapModuleFactory(AppModuleNgFactory); | ||
``` | ||
|
||
- If you **are using `<page-router-outlet>`** you probably don't have to do any changes. Bootstrap will not create `Frame` and `Page`, but the outlet will do that. It will also take care of providing `Page` and so the `ActionBar` should work as _before_. | ||
|
||
|
||
WORKING WITH FRAMES | ||
|
||
There might be multiple frames (if you have multiple `<page-router-outlet>`'s). Angular DI works with singletons, so it will always return one instance of `Frame`. We have introduced `FrameService` (still experimental) which has a `getFrame()` method. It will return the current frame (the one you have navigated last). | ||
|
||
#### Signature of `onAfterLivesync` changed | ||
|
||
The signature `onAfterLivesync` observable changed form: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. form -> from |
||
``` | ||
export const onAfterLivesync = new EventEmitter<NgModuleRef<any>>(); | ||
``` | ||
to: | ||
``` | ||
export const onAfterLivesync = new EventEmitter<{ moduleRef?: NgModuleRef<any>; error?: Error }>(); | ||
``` | ||
|
||
|
||
<a name="5.2.0"></a> | ||
# [5.2.0](https://github.com/NativeScript/nativescript-angular/compare/5.0.0...5.2.0) (2018-01-17) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something is missing here.