Aditya
Aditya

Reputation: 567

In angular 8 how to manage large html file?

Currently I have started working in one Angular 8 project & I am totally new to Angular 8.

In my current project I have one html file which containing around 2500 lines of code & my task is to make it more manageable by dividing into multiple html files.

So from my R&D, I have found that I need to create extra component with html and ts files to solve my problem but I am curious that has there been any way so that I can just simply create extra html files from my main html file without creating ts file & simply include those extra htmls in my main html file.

Also I would like to know the best way to manage large html files in angular 8 because I have searched online but not found any proper answer.

Note: my main html file has dynamic content.

Thanks.

Upvotes: 1

Views: 606

Answers (1)

LogicBlower
LogicBlower

Reputation: 1350

You have to create new component files (ts + html) and include that in you main html file.

You need to use ( @Input / @output ) or Services (with Subject) to pass data/do interaction with the new created files. (if required).

Upvotes: 1

Related Questions