Live data from Hacker News

Angular 9.0

blog.angular.io

41–50 of 308 posts

Re: Angular 9.0

#41

I just upgraded and got 'Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain".' from my S3 through CloudFront. Seems like it's not adding 'type="text/javascript"' to in index.html. When adding this manually, everything works. Just FYI if others upgrade and seem to get the same errors.

My guess is you hit https://github.com/angular/angular/issues/30835. In version 8 we introduced differential loading to allow users on newer browsers to download smaller, modern bundles.

Modules, however, enforce strict mime type checking. As the comment below suggests, you should make sure your static file hosting serves JavaScript with the correct mime type.

Re: Angular 9.0

#42

Huge release with a lot of time and effort put into it. Congrats to the angular team. Couldn’t imagine another framework putting in the amount of work they did in order to insure Ivy goes well.

Thank you! We're really excited to finally make Ivy generally available! ️

Re: Angular 9.0

#43
post #4

Will be interesting to see how it fares in the Js Benchmarks: https://krausest.github.io/js-framework-benchmark/current.ht...

having never seen that benchmark, I’m surprised at how close wasm-bindgen and webstd are to vanilla. It’s not zero overhead yet (for some obvious data conversion issues I’m guessing), but it’s way better than react for example.

Pretty cool.

Re: Angular 9.0

#44
post #21

Earlier quoted context omitted.

I am in no way the whole crowd, but having used both legacy AngularJS, React, and Angular 4+ in production for medium-sized apps, this is my main takeaway: The mental model for React is much simpler than Angular's. In React, There are two concepts one needs to understand: Components, and Hooks. JSX too, but as a web dev the HTML-like syntax was already familiar. In Angular, you need to understand: the binding syntax;…

You don't need to understand hooks to use react.

This is true for Angular as well. To use the framework you don't need to understand everything it provides. In https://angular.io/start we're aiming to reduce the initial conceptual overhead.

We understand that we can work on simplifying the mental model of Angular. This is something we're working towards. We're careful with in process though because we want to provide a consistent, backwards compatible development experience.

Re: Angular 9.0

#45
post #38

Why is Angular so less popular than React?

9 major versions in ~7 years indicates that it's not remotely stable enough to be taken seriously, particularly for corporate stuff that will likely never get an upgrade. Even the "LTS" releases are only supported for 18 months. React seems a bit better, but they don't seem to support older releases at all.

[deleted]

Re: Angular 9.0

#46
One of the nice things that Angular has you don't see in the post is... very polite and courteous maintainers! https://github.com/angular/angular/pull/33717#issuecomment-5...

This was a fast release cycle. It was back in November 2019 we were talking about 3.7, and now it's in.

I'm not even thinking about Ivy. But it's nice to have all the nice comforts of typescript ready and working out of the box. (I mainly work in React, but dabble with angular/vue to stay up to date)

And what a smooth update process (abbreviated):

    ng update @angular/cli @angular/core
    ** Executing migrations of package '@angular/cli' **
    ** Executing migrations of package '@angular/core' **
    Your project has been updated to Angular version 9!
    For more info, please see: https://v9.angular.io/guide/updating-to-version-9

Re: Angular 9.0

#47
post #3

I just updated my mid-size app from v8.2 to v9 with Ivy, and the total es2015 bundle size decreased from 973 KB to 669 KB. An over 31% improvement with no effort on my part!

> 973 KB to 669 KB Is that minified and gzipped?

Just minified. Gzipped size is now 225 KB.

Re: Angular 9.0

#48
post #17

Earlier quoted context omitted.

I'm also curious, in particular why is the swap rows benchmark so much slower?

because React's stance is that it's a rare enough case in their experience, so they don't spend time optimizing for it. that metric is slower in general because libs with simple reconciliation strategies will tend to do work for every row between the two swapped ones (2,998).

So what's the benefit of more complex ones like react's?

Re: Angular 9.0

#49
post #3

I just updated my mid-size app from v8.2 to v9 with Ivy, and the total es2015 bundle size decreased from 973 KB to 669 KB. An over 31% improvement with no effort on my part!

> 973 KB to 669 KB Is that minified and gzipped?

I would assume angular outputs minified code, but not gzipped.

That being said, 973kb seems like large-sized rather than mid-sized to me.

Re: Angular 9.0

#50
post #24

How does Aurelia compare?

In my opinion, Aurelia has always been the less complicated and lighter option of the two. Aurelia 1 had some design choices that made it harder to tree shake down, but Aurelia 2 is around the corner with AOT and numerous optimisations that looks like will put it at the top of the benchmarks again.
Post reply on HN