Skip to content

Commit 2e3b7bb

Browse files
docs(migration): fix header levels in v4 migration guide (#2872)
1 parent 80c0d95 commit 2e3b7bb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/updating/4-0.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ We suggest the following general process when migrating an existing application
3030

3131
In many cases, using the Ionic CLI to generate a new object and then copying the code also works very well. For example: `ionic g service weather` will create a shell `Weather` service and test. The code can then be copied from the older project with minor modifications as needed. This helps to ensure the proper structure is followed. This also generates shells for unit tests.
3232

33-
## Changes in Package Name
33+
### Changes in Package Name
3434

3535
In Ionic 4, the package name is `@ionic/angular`. Uninstall Ionic 3 and install Ionic 4 using the new package name:
3636

@@ -41,7 +41,7 @@ $ npm install @ionic/angular@v4-lts
4141

4242
While migrating an app, update the imports from `ionic-angular` to `@ionic/angular`.
4343

44-
## Project structure
44+
### Project structure
4545

4646
One of the major changes between an Ionic 3 app and an Ionic 4 app is the overall project layout and structure. In v3, Ionic apps had a custom convention for how an app should be set up and what that folder structure should look like. In v4, this has been changed to follow the recommended setup of each supported framework.
4747

@@ -133,19 +133,19 @@ See the following `ionic.config.json` as an example:
133133
}
134134
```
135135

136-
## RxJS Changes
136+
### RxJS Changes
137137

138138
Between V3 and V4, RxJS was updated to version 6. This changes many of the import paths of operators and core RxJS functions. Please see the <a href="https://github.com/ReactiveX/rxjs/blob/6.x/docs_app/content/guide/v6/migration.md" target="_blank">RxJS Migration Guide</a> for details.
139139

140-
## Lifecycle Events
140+
### Lifecycle Events
141141

142142
With V4, we're now able to utilize the typical events provided by [Angular](https://angular.io/guide/lifecycle-hooks). But for certain cases, you might want to have access to the events fired when a component has finished animating during its route change. In this case, the `ionViewWillEnter`, `ionViewDidEnter`, `ionViewWillLeave`, and `ionViewDidLeave` have been ported over from V3. Use these events to coordinate actions with Ionic's own animations system.
143143

144144
Older events like `ionViewDidLoad`, `ionViewCanLeave`, and `ionViewCanEnter` have been removed, and the proper Angular alternatives should be used.
145145

146146
For more details, check out the [router-outlet docs](../api/router-outlet.md)
147147

148-
## Overlay Components
148+
### Overlay Components
149149

150150
In prior versions of Ionic, overlay components such as Loading, Toast, or Alert were created synchronously. In Ionic v4, these components are all created asynchronously. As a result of this, the API is now promise-based.
151151

@@ -183,15 +183,15 @@ async showAlert() {
183183
}
184184
```
185185

186-
## Navigation
186+
### Navigation
187187

188188
In V4, navigation received the most changes. Now, instead of using Ionic's own `NavController`, we integrate with the official Angular Router. This not only provides a consistent routing experience across apps, but is much more dependable. The Angular team has an <a href="http://angular.io/guide/router" target="_blank">excellent guide</a> on their docs site that covers the Router in great detail.
189189

190190
To provide the platform-specific animations that users are used to, we have created `ion-router-outlet` for Angular Apps. This behaves in a similar manner to Angular's `router-outlet` but provides a stack-based navigation (tabs) and animations.
191191

192192
For a detailed explanation in navigation works in a V4 project, check out the [Angular navigation guide](../angular/navigation.md).
193193

194-
## Lazy Loading
194+
### Lazy Loading
195195

196196
Since Navigation has changed, the mechanism for lazy loading has also changed in V4.
197197

@@ -241,7 +241,7 @@ export class AppModule {}
241241

242242
For a detailed explanation of lazy loading in V4 project, check out the [Angular navigation guide](../angular/navigation.md#lazy-loading-routes).
243243

244-
## Markup Changes
244+
### Markup Changes
245245

246246
Since v4 moved to Custom Elements, there's been a significant change to the markup for each component. These changes have all been made to follow the Custom Elements spec, and have been documented in a <a href="https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md#breaking-changes" target="_blank">dedicated file on GitHub</a>.
247247

0 commit comments

Comments
 (0)