Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49306

Ionic Generate Page Issue with Angular Standalone

$
0
0

I am building Ionic 7.2.0/Angular/ngModule apps. Recently I found that once I use command line “Ionic g page page_name”, it always fails the compiling with the generated page with the following error message:

“error NG6008: Component PageName is standalone, and cannot be declared in an NgModule. Did you mean to import it instead?”

I further investigated and found that I can add “standalone: false,” to @Component part in the page_name.page.ts file to fix the issue. However, it is very inconvenient to add such a statement for each new page I create. Is it possible to fix “Ionic generate” to avoid the error generated by default? Thanks!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49306

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>