Skip to content

Commit 6392b76

Browse files
committed
docs(): add polyfill notes
1 parent a4c6258 commit 6392b76

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

src/components.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import '@stencil/core';
99

10-
import '@ionic/core';
1110
import '@stencil/router';
1211
import '@stencil/state-tunnel';
12+
import '@ionic/core';
1313
import 'ionicons';
1414
import {
1515
ColorVariable,

src/pages/faq/runtime.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,39 @@ contributors:
1515
1616
There are several different reasons this can happen. If you are unable to find a solution on the [Ionic forums](https://forum.ionicframework.com), make sure:
1717

18-
- Root `@Component` has a `template` or `templateUrl`.
19-
- Root `@Component` template has an `<ion-nav>` with a `root` property:
18+
- Polyfills are not included for older browser/versions of android
19+
20+
For projects with `@angular/[email protected]` or above, polyfills will automatically be included. For project created before that, polyfills need to be manually enabled.
21+
22+
In `src/polyfills.ts`, you must enabled all ES6 polyfills for Android 4.4 support.
23+
24+
Alternatively, a project could be updated to use the latest release of the `@angular/cli` package & `@angular-devkit` packages and include the `es5BrowserSupport` option in the `angular.json`'s build options object:
25+
26+
```diff
27+
"input": "src/global.scss"
28+
}
29+
],
30+
- "scripts": []
31+
+ "scripts": [],
32+
+ "es5BrowserSupport": true
33+
},
34+
"configurations": {
35+
"production": {
36+
```
37+
38+
This will automatically include the polyfills for older browsers that need them.
39+
2040

21-
```html
22-
<ion-nav [root]="rootPage"></ion-nav>
23-
```
2441

2542
## Directive Not Working
2643

2744
> Why is my custom component/directive not working?
2845
2946
There are a few things you can check. Make sure:
3047

31-
- You include it in the `directives` array of the `@Component` you want to use it in (only if your ionic-angular version is below RC0).
3248
- Your selector doesn't have any misspellings.
3349
- You're using the selector correctly as an attribute, element or class.
34-
- Your selector has the [proper syntax](http://learnangular2.com/components/):
50+
- Your selector has the proper syntax:
3551
- `[attr]` if it's an attribute selector
3652
- `element` if it's an element selector
3753
- `.class` if it's a class selector

0 commit comments

Comments
 (0)