简体   繁体   中英

How to deal with a large number of pages in Angular 2?

I'm new to Angular 2+.

I want to create an application with 121 html pages (actually an ionic3 stories application, one story is on one html template).

In this case, I must use CLI to ng generate 121 components or could I have another way to do this faster?

Please help me. Thanks for your help.

Its hard to say without seeing your templates. But if you sure need to run generate component command many times, you can do for ex: n=1; while [[ $n -lt 3 ]]; do ng gc component${n}; n=$((n+1)); done n=1; while [[ $n -lt 3 ]]; do ng gc component${n}; n=$((n+1)); done

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM