Angular 2 `entity` sub-generator generated resources using angularjs 1 fileset.
See original GitHub issueOverview of the issue
When using entity
or import-jdl
sub-generator with Angular 2. The wrong file set (for angularjs 1.x) always been picked and resources generated as following:
Unable to find src/main/webapp/app/layouts/navbar/navbar.html or missing required jhipster-needle. Reference to book not added to menu.
create .jhipster/Book.json
create src/main/resources/config/liquibase/changelog/20170122164545_added_entity_Book.xml
...
create src/main/webapp/app/entities/book/book.state.js
create src/main/webapp/app/entities/book/book.controller.js
create src/main/webapp/app/entities/book/book-dialog.controller.js
create src/main/webapp/app/entities/book/book-delete-dialog.controller.js
create src/main/webapp/app/entities/book/book-detail.controller.js
create src/main/webapp/app/entities/book/book.service.js
create src/main/webapp/i18n/zh-tw/book.json
Motivation for or Use Case
Since I chosen the Angular 2 as client framework, entity generation should generate the right file set.
Reproduce the error
yo jhipster
, selectangular2
and left all options as-is.yo jhipster:entity book
, set field 1 totitle: String
and left all options as-is.
Related issues
I did’t find any related issues about this breakage, but found a few issues saying this feature is complete.
Suggest a Fix
I’m willing to contribute, can somebody instruct me how to tracing/debugging the yo generating process. Or advice me how can I help resolving this issue.
JHipster Version(s)
Current master branch. ( https://github.com/jhipster/generator-jhipster/commit/c06e8f77c05fac03f4c37f98006ae0318fe16775 actually)
JHipster configuration, a .yo-rc.json
file generated in the root folder
{
"generator-jhipster": {
"jhipsterVersion": "3.12.2",
"baseName": "test",
"packageName": "test",
"packageFolder": "test",
"serverPort": "8080",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"buildTool": "maven",
"enableSocialSignIn": false,
"rememberMeKey": "139eaa68445b71b513f9c365b6b8030d14712c5f",
"useSass": false,
"clientPackageManager": "yarn",
"applicationType": "monolith",
"clientFramework": "angular2",
"testFrameworks": [],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "zh-tw",
"languages": [
"zh-tw"
]
}
}
Entity configuration(s) entityName.json
files generated in the .jhipster
directory
Book.json
{
"fluentMethods": true,
"relationships": [],
"fields": [
{
"fieldName": "title",
"fieldType": "String"
}
],
"changelogDate": "20170122164545",
"dto": "no",
"service": "no",
"entityTableName": "book",
"pagination": "no"
}
Browsers and Operating System
java version “1.8.0_112” Java™ SE Runtime Environment (build 1.8.0_112-b16) Java HotSpot™ 64-Bit Server VM (build 25.112-b16, mixed mode)
git version 2.11.0
node: v7.4.0
npm: 4.0.5
yeoman: 1.8.5
yarn: 0.19.1
Docker version 1.13.0, build 49bf474
docker-compose version 1.10.0, build 4bd6f1a
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Don’t worry, it happened to me last week too 😉
@jdubois , I finally got why the project’s version number still stick to 3.12.2. Is it possible to distinguish from project version to template version, so that one can be more easily aware of the version they used?