Search code examples
htmlangulartypescriptionic-frameworkionic5

How to use Ionic after installation in an existing angular project


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


Solution

  • 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:)