Title: new library public-api.ts file not using component type declared on angular.json's schematics · Issue #26981 · angular/angular-cli · GitHub
Open Graph Title: new library public-api.ts file not using component type declared on angular.json's schematics · Issue #26981 · angular/angular-cli
X Title: new library public-api.ts file not using component type declared on angular.json's schematics · Issue #26981 · angular/angular-cli
Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description When I create a new library the default component inside of the lib folder takes its type from the component schematic declar...
Open Graph Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description When I create a new library the default component inside of the lib folder takes its ...
X Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description When I create a new library the default component inside of the lib folder takes ...
Opengraph URL: https://github.com/angular/angular-cli/issues/26981
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"new library public-api.ts file not using component type declared on angular.json's schematics","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nDon't known / other\n\n### Is this a regression?\n\nNo\n\n### Description\n\nWhen I create a new library the default component inside of the lib folder takes its type from the component schematic declared on angular.json. If for example my angular.json looks like this:\r\n```\r\n{\r\n //...\r\n \"newProjectRoot\": \"projects\",\r\n //...\r\n \"schematics\": {\r\n \"@schematics/angular:application\": {\r\n \"style\": \"scss\",\r\n \"inlineTemplate\": true,\r\n \"inlineStyle\": true,\r\n \"ssr\": false\r\n },\r\n \"@schematics/angular:component\": {\r\n \"changeDetection\": \"OnPush\",\r\n \"type\": \"Cmp\",\r\n \"inlineStyle\": true,\r\n \"inlineTemplate\": true,\r\n \"style\": \"scss\"\r\n }\r\n }\r\n}\r\n```\r\n\r\nAfter creating a library using `ng generate library foo-library`, the new library includes an empty dummy `FooLibraryCmp` inside the `projects/foo-library/src/lib/foo-library.cmp.ts`. However, the contents of `projects/foo-library/src/public-api.ts` look like this:\r\n\r\n```\r\n/*\r\n * Public API Surface of foo-library\r\n */\r\n\r\nexport * from './lib/foo-library.service';\r\nexport * from './lib/foo-library.component'; // uses .component instead of .cmp\r\n```\n\n### Please provide a link to a minimal reproduction of the bug\n\n_No response_\n\n### Please provide the exception or error you saw\n\n_No response_\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 17.1.1\r\nNode: 18.18.0\r\nPackage Manager: npm 9.6.6\r\nOS: win32 x64\r\n\r\nAngular: 17.1.1\r\n... animations, cli, common, compiler, compiler-cli, core, forms\r\n... platform-browser, platform-browser-dynamic, platform-server\r\n... router, ssr\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1701.1\r\n@angular-devkit/build-angular 17.1.1\r\n@angular-devkit/core 17.1.1\r\n@angular-devkit/schematics 17.1.1\r\n@schematics/angular 17.1.1\r\nng-packagr 17.1.2\r\nrxjs 7.8.1\r\ntypescript 5.2.2\r\nzone.js 0.14.3\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/johalternate","@type":"Person","name":"johalternate"},"datePublished":"2024-01-28T01:15:13Z","url":"https://github.com/angular/angular-cli/issues/26981"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:430921d9-34ac-533d-1a04-51775659dcb1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D17A:29AEE8:314D8C6:41B0399:6B01E97B |
| html-safe-nonce | 3c39aa5c428effc2d88a3c8af09d9719a2703310214e1afad00302c342b96f2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTdBOjI5QUVFODozMTREOEM2OjQxQjAzOTk6NkIwMUU5N0IiLCJ2aXNpdG9yX2lkIjoiMzQyMjQ1NDM4MTA1OTEwNzE5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 41de79795ec2c3584bd99aa7ffd7e711d32c79a12748be81d1511fea2dc7c329 |
| hovercard-subject-tag | issue:2103930861 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/26981/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a3905e7863c4cd03e3ad8af7b18629151a5935c3ee2d6fc5fc7b00fe697d79eb/angular/angular-cli/issues/26981 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a3905e7863c4cd03e3ad8af7b18629151a5935c3ee2d6fc5fc7b00fe697d79eb/angular/angular-cli/issues/26981 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description When I create a new library the default component inside of the lib folder takes its ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | johalternate |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width