mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +08:00
docs(): add ng-add testing docs to readme (#16478)
This commit is contained in:
@ -18,3 +18,38 @@ Ionic Angular specific building blocks on top of [@ionic/core](https://www.npmjs
|
|||||||
## License
|
## License
|
||||||
|
|
||||||
* [MIT](https://raw.githubusercontent.com/ionic-team/ionic/master/LICENSE)
|
* [MIT](https://raw.githubusercontent.com/ionic-team/ionic/master/LICENSE)
|
||||||
|
|
||||||
|
## Testing ng-add in ionic
|
||||||
|
|
||||||
|
1. Pull the latest from master
|
||||||
|
2. Build ionic/angular: `npm run build`
|
||||||
|
3. Run `npm link` from ionic/angular directory
|
||||||
|
4. Create a blank angular project
|
||||||
|
|
||||||
|
```
|
||||||
|
ng new add-test
|
||||||
|
// Say yes to including the router, we need it
|
||||||
|
cd add-test
|
||||||
|
```
|
||||||
|
|
||||||
|
5. To run schematics locally, we need the schematics-cli (once published, this will not be needed)
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @angular-devkit/schematics-cli
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Link `@ionic/angular`
|
||||||
|
|
||||||
|
```
|
||||||
|
npm link @ionic/angular
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
7. Run the local copy of the ng-add schematic
|
||||||
|
|
||||||
|
```
|
||||||
|
$ npx schematics @ionic/angular:ng-add
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
You'll now be able to add ionic components to a vanilla Angular app setup.
|
||||||
|
Reference in New Issue
Block a user