Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a current Angular project which I want to be a simple (HTML, CSS, JS) website without the whole script that Angular adds to the project. I want my routes to be converted into several HTML files where each file contains the actual content, not some script tags that refer to some javascript files. I mean I want it to be as if I designed the website without Angular. I know Angular is effective but I need this for some reason. How can I acheive this?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.9k views
Welcome To Ask or Share your Answers For Others

1 Answer

Fancy way: turn your Angular Components into Web Components by using Angular Elements. Angular Elements is a feature of Angular framework (not a third party package) that allows you to "convert" your Angular components into native Web Components. Web Components are custom HTML elements (JS API, not Angular related). So you can use them in apps built with other frameworks (such as Vue.js) or even in vanilla JS apps. Web components are now supported natively by any active browser. This is a pretty good guide (in the guide example, we serve an Angular component in a vanilla JS app).

Amanuensis way: manually copy and paste what you need.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...