I have created a ionic2 porject and added a new page with the following command ionic g page new
I have imported the new page in both app.component.ts and app.module.ts.
When I start the project with ionic serve is gives me the following error
[18:00:33] typescript: E:/MyApp/Projects/Ionic/Test7/test/src/app/app.module.ts
, line: 8 L6:
import { NewPage } from '../pages/new/new';
Module '"E:/MyApp/Projects/Ionic/Test7/test/src/pages/new/new"' has
no exported member 'NewPage'.
Any help regarding this issue?
Following is the version. All updates and reinstall tried.
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.36
OS: Windows 8.1
Node Version: v6.7.0
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.5
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 2.6
Node Version: v7.4.0
Xcode version: Not installed
[13:48:26] ionic-app-scripts 1.0.0
[13:48:26] watch started …
[13:48:26] build dev started …
[13:48:26] clean started …
[13:48:26] clean finished in 10 ms
[13:48:26] copy started …
[13:48:26] transpile started …
[13:48:31] typescript: src/app/app.component.ts, line: 7
Module ‘"/home/ramasr/Desktop/Arun/ionicApp/IBMPortal/src/pages/login/login"’ has no exported member
’login’.
L6: import { Page2 } from '../pages/page2/page2';
L7: import { login } from '../pages/login/login';
If you want to use lazy page loading, change that IonicModule to IonicPageModule. If you don’t, blow away that messages.module.ts file than was generated.