简体   繁体   中英

Is there any drawback of using angular component in a cheap way

The functionalities in angular component is no doubt valuable.

But I have some piece of html code which I just want to reuse, and reuse it a lot. So I am thinking of wrapping it into an angular component. Another benefit is to do i18n in this single component. It would be great as well.

Is there any drawback in doing this? Ex. performance, bundle size or other concerns, even potential cons.

Thanks.

You will have for sure the drawbacks of every Single Page Application. Your HTML will be rendered through JavaScript execution and then will be harder for search engines to understend what your application does and how to rank it. Plus that JavaScript files will take up some space and then the page will be a little slower to load up.

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