4 ms·
Angular is a framework for single-page applications, based on components with templates. If a property of a component changes, the rendering is automatically up
by goto11 5y ago
Angular is a framework for single-page applications, based on components with templates. If a property of a component changes, the rendering is automatically updated by the framework. This is supposed to free you from direct DOM manipulation and let you focus on the business logic.
Angular is somewhat similar to React and other SPA-frameworks, but Angular takes more of a kitchen-sink approach and provide its own dependency injection framework, URL routing, HTTP client abstractions and so on.
In comparison jQuery is just a library, it doesn't really care how you structure your application. jQuery makes it a lot easier to manipulate the DOM, but something like Angular is supposed to free you from having to manually touch the DOM in the first place.
And JavaScript is a programming language, but you probably already know that.
- commandlinefan 5y ago> JavaScript is a programming language Ok, fair enough - JavaScript + DOM is a "framework" for creating webapps.
- goto11 5y agoYeah you can say that - the browser environment with DOM and other Wep API's is a framework for client-side apps. Single-page application frameworks like Angular, React etc. are frameworks on top of this, which provide higer-level abstractions and tools. Whether you need these higher level abstractions depend on your use case. If you have lots of in-page DOM mutation in response to user interaction or data from the server, a SPA framework might simplify things. For a site like HN with very little in-page DOM mutation it probably isn't worth the complexity.