From 12eace0cc03dee93d40188e27f830cbe3410401e Mon Sep 17 00:00:00 2001 From: soundproofboot Date: Wed, 25 Jun 2025 15:55:08 -0500 Subject: [PATCH] docs(angular): update testing ng-add --- packages/angular/README.md | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/packages/angular/README.md b/packages/angular/README.md index 0a1b2c488d7..c38e09fe97e 100644 --- a/packages/angular/README.md +++ b/packages/angular/README.md @@ -21,36 +21,48 @@ Ionic Angular specific building blocks on top of [@ionic/core](https://www.npmjs ## Testing ng-add in ionic 1. Pull the latest from `main` -2. Build ionic/angular: `npm run build` -3. Run `npm link` from `ionic/angular/dist` directory -4. Create a blank angular project +2. Install dependencies and build `core` package: ``` -ng new add-test -// Say yes to including the router, we need it -cd add-test +$ cd core +$ npm install +$ npm run build ``` -5. To run schematics locally, we need the schematics-cli (once published, this will not be needed) +3. Install dependencies and build Angular package: ``` -npm install @angular-devkit/schematics-cli +$ cd ../packages/angular +$ npm install +$ npm run build ``` -6. Link `@ionic/angular` - +4. Link Angular package from `dist` folder ``` -npm link @ionic/angular +$ cd dist +$ npm link ``` +5. Create a blank angular project + +``` +$ ng new add-test +$ cd add-test +``` -7. Run the local copy of the ng-add schematic +6. Link the local ionic/angular package to the add-test app ``` -$ npx schematics @ionic/angular:ng-add +$ npm link @ionic/angular ``` +8. Run the local copy of the ng-add schematic + +``` +$ ng add @ionic/angular +``` + You'll now be able to add ionic components to a vanilla Angular app setup. ## Project Structure