which wasn't even finalized when Angular was made. This means Angular in its entirety can break if TS or ES defines decorators in a different way
The dependency injection of Angular is magic that TS itself cannot do. The Angular compiler looks through the constructor and figures out what types it wants and somehow includes that in the build files. There is no JS that can figure out what types a function wants.
Having it so extremely class based is very cumbersome. Have a function that formats a string? Too bad. Wrap it in a pipe class to use it. That pipe class in turn has to be included in an angular module. In React you just use the function; no need for a wrapper. Have a value you want to use? Import it, put it in your class, then you can use it. In React you just use the value without a wrapper.
The "HTML" is not HTML, even though it is stored in HTML files. It's pseudo-HTML. The files should be marked as such, with .ahtml or something.
The module system in Angular is completely unnecessary. ES already has a module system that provides far better traceability than what the Angular modules do
I would love to know how Angular decorators do not follow TS standards. Dependency injection is a framework feature, not TS. else what would be the purpose of the framework? The same way we have magic in react or other frameworks. It is not magic also, it uses tokens which can be inferred from type, class serialization, explicit string e.t.c One can use functions, no need to wrap them. Pipe are special type of helpers that are used to transform data in template expressions. It is just an available option that one does not need to use as they can transform the data outside the view. HTML is not HTML - It starts as pure HTML, not like React or it's cousins. If you want pure html, then I don't understand you even need a framework.
and module systems is optional nowadays as we have standalone components
Обсуждают сегодня