我用ionic 7和Angular 15创建了一个新的应用程序,但是当我调用:
离子启动试验空白-类型=角形
文件src\app\app-routing.module.ts
没有被创建,如果我运行ionic g page page/myPage
,没有模块被创建。
这里所有的依赖安装:
- @angular/cli@15.2.4
- @briebug/jest-schematic@5.0.0
- @ionic/cli@7.0.0
- @nestjs/cli@9.1.3
- cordova-res@0.15.4
- jest@29.3.1
- native-run@1.7.2
我的package.json
{
"name": "pokedexApp",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint"
},
"private": true,
"dependencies": {
"@angular/common": "^15.0.0",
"@angular/core": "^15.0.0",
"@angular/forms": "^15.0.0",
"@angular/platform-browser": "^15.0.0",
"@angular/platform-browser-dynamic": "^15.0.0",
"@angular/router": "^15.0.0",
"@capacitor/app": "4.1.1",
"@capacitor/core": "4.7.1",
"@capacitor/haptics": "4.1.0",
"@capacitor/keyboard": "4.1.1",
"@capacitor/status-bar": "4.1.1",
"@ionic/angular": "^7.0.0",
"ionicons": "^7.0.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.0.0",
"@angular-eslint/builder": "^15.0.0",
"@angular-eslint/eslint-plugin": "^15.0.0",
"@angular-eslint/eslint-plugin-template": "^15.0.0",
"@angular-eslint/schematics": "^15.0.0",
"@angular-eslint/template-parser": "^15.0.0",
"@angular/cli": "^15.0.0",
"@angular/compiler": "^15.0.0",
"@angular/compiler-cli": "^15.0.0",
"@angular/language-service": "^15.0.0",
"@capacitor/cli": "4.7.1",
"@ionic/angular-toolkit": "^9.0.0",
"@types/jasmine": "~4.0.0",
"@types/node": "^12.11.1",
"@typescript-eslint/eslint-plugin": "5.3.0",
"@typescript-eslint/parser": "5.3.0",
"eslint": "^7.6.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.6",
"eslint-plugin-prefer-arrow": "1.2.2",
"jasmine-core": "~4.3.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"ts-node": "~8.3.0",
"typescript": "~4.8.4"
},
"description": "An Ionic project"
}
Thanks.
1条答案
按热度按时间to94eoyn1#
Angular已经更新了这个叫做standalone的功能,如果你可以进入.ts文件,它会被设置为true,在你的情况下,如果你有一个app.component.ts,无论在导入数组下的@NgModules中导入的模块会被导入到导入数组中的这个@Component的导入数组中,我将提供屏幕截图this is how my app.componet.ts looks like