Closed mahmoudrabie closed 7 years ago
+1 missing .module.ts file too
+1
By running ionic g page testPage
, I get:
import { Component } from '@angular/core';
$IMPORTSTATEMENT
/**
* Generated class for the TestPage page.
*
* See http://ionicframework.com/docs/components/#navigation for more info
* on Ionic pages and navigation.
*/
$IONICPAGE
@Component({
selector: 'page-test',
templateUrl: 'test.html',
})
export class TestPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad TestPage');
}
}
Notice $IMPORTSTATEMENT
and $IONICPAGE
Hello all! What version of app-scripts do you have installed? Would you mind posting the output of ionic info
here please?
Hi, can you please update to ionic-angular 3.6? There were some changes needed in the ionic-angular templates in order to support lazy-loading and non-lazy loaded pages. From whats been reported it looks like you have the latest app-scripts and CLI, but not the framework. Please update that as well 😄
Thanks a lot for your support. $ ionic info
cli packages:
@ionic/cli-plugin-cordova : 1.5.0 (PROJ_DIR/node_modules/@ionic/cli-plugin-cordova)
@ionic/cli-plugin-ionic-angular : 1.4.0 (PROJ_DIR/node_modules/@ionic/cli-plugin-ionic-angular)
@ionic/cli-plugin-proxy : 1.4.0 (PROJ_DIR/node_modules/@ionic/cli-plugin-proxy)
@ionic/cli-utils : 1.6.0 (PROJ_DIR/node_modules/@ionic/cli-utils)
ionic (Ionic CLI) : 3.6.0 (PROJ_DIR/node_modules/ionic)
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.5.3
System:
Node : v6.11.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 5.1.0
npm : 5.3.0
Please reopen the issue. What does need update?
here is my info,I have updated ionic-angular to the latest version,but the problem is still exist: cli packages:
@ionic/cli-utils : 1.6.0
ionic (Ionic CLI) : 3.6.0
global packages:
Cordova CLI : 6.2.0
local packages:
@ionic/app-scripts : 2.1.3
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 5.1.1
Ionic Framework : ionic-angular 3.6.0
System:
Node : v6.11.1
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
npm : 5.3.0
same problem here.
cli packages:
@ionic/cli-utils : 1.6.0 (/Users/raykin/studio/aska/node_modules/ionic/node_modules/@ionic/cli-utils)
ionic (Ionic CLI) : 3.6.0 (/Users/raykin/studio/aska/node_modules/ionic)
global packages:
Cordova CLI : 6.5.0
Gulp CLI : CLI version 3.9.1 Local version 3.9.1
local packages:
@ionic/app-scripts : 2.1.3
@ionic/cli-plugin-cordova : 1.4.1
@ionic/cli-plugin-gulp : 1.0.2
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms : ios 4.1.1
Ionic Framework : ionic-angular 3.6.0
System:
Node : v7.9.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 5.1.0
npm : 5.3.0
Can you run npm i @ionic/cli-plugin-ionic-angular@latest --save-dev
@mhartington updated it to 1.4.0, but still not work.
~/studio/aska (master ✘)✹✭ ᐅ ionic info
cli packages:
@ionic/cli-plugin-ionic-angular : 1.4.0 (/Users/raykin/studio/aska/node_modules/@ionic/cli-plugin-ionic-angular)
@ionic/cli-utils : 1.6.0 (/Users/raykin/studio/aska/node_modules/ionic/node_modules/@ionic/cli-utils)
ionic (Ionic CLI) : 3.6.0 (/Users/raykin/studio/aska/node_modules/ionic)
global packages:
Cordova CLI : 6.5.0
Gulp CLI : CLI version 3.9.1 Local version 3.9.1
local packages:
@ionic/app-scripts : 2.1.3
@ionic/cli-plugin-cordova : 1.4.1
@ionic/cli-plugin-gulp : 1.0.2
Cordova Platforms : ios 4.1.1
Ionic Framework : ionic-angular 3.6.0
System:
Node : v7.9.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 5.1.0
npm : 5.3.0
how can I found docs for $ usage and where to find the $IMPORTTANTSTATEMENT ?
@raykin can you try one of the following?
1) delete node modules and package-lock.json file? 2) start a new project and test the generators out?
Im unable to replicate this at all on my end.
Mike was right. It was Ionic Framework : ionic-angular 3.5.3 Now it is Ionic Framework : ionic-angular 3.6.3
Now, It is working perfect.
Thanks a lot.
Correction Ionic Framework : ionic-angular 3.6.0
my problem is solved ,after update cli-plugin-ionic-angular to the latest version,Thanks a lot
Thanks, closing.
still not working...
my environment:
cli packages: (/Users/tuo3/git/drip-ionic3/node_modules)
@ionic/cli-utils : 1.10.2
ionic (Ionic CLI) : 3.10.3
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 1.3.12
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.6.1
System:
ios-deploy : 1.9.1
ios-sim : 4.1.1
Node : v7.3.0
npm : 4.0.5
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
you need update ionic/app-scripts to the latest version
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Ionic version:
[ x ] 3.x
I'm submitting a ... [ x ] bug report
Current behavior: Thanks to IONIC Team for adding back the functionality of generating lazy loaded pages. However, the generated page component file doesn't contain
@IonicPage()
Expected behavior: For lazy loading, it must include that decorator above
@Component
Steps to reproduce:
ionic g page ClassesAdd
Related code: