Home > Software design >  How to use Ionic after installation in an existing angular project
How to use Ionic after installation in an existing angular project

Time:10-25

I have already installed ionic with the command npm install -g @ionic/cli native-run cordova-res and then I did this command ng add @ionic/angular and it did help that it added the line "@ionic/angular": "^6.3.2 ", in package.json but when I add import of ionic import {IonicModule} from '@ionic/angular' I get dozens of bugs . '.node_modules/@ionic/angular/directives/proxies.d.ts(725,21): error TS2694: Namespace '"C:/Project/MCProject/MCProject-client/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'... and more what can i do this import without this bug??? Please help me to solve the problem

CodePudding user response:

If you are starting with ionic and you wanna run your first ionic project, these are the steps to follow:

  1. ionic start myApp blank
  2. cd myApp (go to app root folder)
  3. ionic serve

It's as simple as that. This is a simple tutorial in case you wanna learn a bit more: https://ionic.io/blog/10-minutes-with-ionic-2-hello-world

CodePudding user response:

You need to do tow simple steps: 1.npm install --save @ionic/angular 2.npm start I tried for two whole days but it didn't work. and when I did it everything worked. G‍ood Luck:)

  • Related