Live data from Hacker News

Angular 2 Final Released

angular.io

181–190 of 452 posts

Re: Angular 2 Final Released

#181
It's a fantastic framework and I'm looking forward to building a ton of cool stuff with it.

Though next week's announcement...

Angular 2.0.1 RC 1

It's Change Log will read:

  * Routing has been rebuilt.. all previous versions not compatible

  * We decided to rename the NgModule decorator to NgYouMAD?

  * All Internet tutorials no longer work... Good Luck relearning!

Re: Angular 2 Final Released

#182
post #95

As someone who uses Angular 1 currently but would pick React for their next project, I'd love to see a list of reasons why I should use Angular 2 over React. If nothing else, Angular just stranded all their developers, while React has a huge head start on mindshare/plugins/tutorials/etc.

Why not choose Vue.js? It's extremely simple, fast, easy to get started with, and very similar to Angular.

I like Vue.js, but there are no good UI frameworks such as Ionic that work with Vue for mobile apps.

Re: Angular 2 Final Released

#183
post #129

Earlier quoted context omitted.

And it needs tools upon tools upon tools to set up, whateverify, transpile and pack the files you write into something that can display in a browser. I think this was true six months ago but now there is create-react-app. You might want to try it out - you won't need to whateverify your code, you just need that one tool. Also it works on Windows. https://github.com/facebookincubator/create-react-app I want to edit so…

> With create-react-app the browser will know you've made a change, and reload for you ;-) Isn't that hot reloading of components which they say is unsupported?

It actually refreshes the whole page it isn't hot reloading. It's more like live reloading (who page instead of pieces of the page).

Re: Angular 2 Final Released

#184
post #164

Earlier quoted context omitted.

True story. But how did you get rid of the implicit anys when using JSX? I used this compiler flag that forbids them and suddnendly nothing worked anymore. It seemed that almost everything returned any per default.

That compiler flag is wonderful, and so is the newer 'strictNullChecks' I use these typings: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/mast... Then create my components like this: interface Props { } interface State { } class MyComponent extends React.Component { } and everything is typed correctly (beside setState which is impossible to type exactly as of today)

Maybe it was the type definition I used...

Re: Angular 2 Final Released

#185
Right now, I'm considering which works best for me. Requirements: App for Android & iPhone plus Web-based app. The most complex part is a Graph with interactions (such as highlighting a specific value). It should feel snappy, although I don't make heavy use of neither gestures nor OS-related features.

Ionic 2 + Angular 2 seem to be the best choice, since I can basically write the app once and release for all three platforms.

React Native has the downside that React and React Native are two different things. Be aware that there is no such thing as React Native for the web. There's something in development right now, but nothing stable.

Truly native: I can't support three platforms as a single developer and I don't feel like outsourcing it.

I'll go with Ionic 2 + Angular 2, although Ionic 2 still has quite a few bugs. For example, the zoom attribute on doesn't work – which is critical for my app.

Sure, there are hacks and this reminds me on the discussion from the other day: https://news.ycombinator.com/item?id=12477190

Yes, it's all very hacky. But there's really no alternative I guess.

Re: Angular 2 Final Released

#186
post #87

Earlier quoted context omitted.

Obtuse error logging is my biggest problem. A lot of the times you have no idea what's going wrong.

That's a general javascript problem though as soon as you involve any third party library. Something funky going wrong when jQuery's involved? Good luck stepping through that.

May want to give Sentry a try for error logging: sentry.io/for/angular2

Let us know if there's anything we can be doing better :)

Re: Angular 2 Final Released

#187

Nodody mentioned angular universal here. I think it's a big win to prerender the SPA on the server. It's faster, more mobile friendly and pages can be indexed by search engines. IDEs have to implement better support for NG2 but this will come over time.

As far as I know, Google does index SPAs that are only rendered in the browser.

Google does not index my ng2 site without prerendering.

There will be always limits for search engines on interpreting js.

Re: Angular 2 Final Released

#188
post #177
post #153

Earlier quoted context omitted.

Have you actually benchmarked polymer in a non-chrome browser? It is much faster than Angular - somewhere around React performance. Polymer is picked up by big companies already whereas "no one"(big) is using angular 2.x for now. People here seem to project a weird bubble around Angular/React. > In other browsers not so. I hope v2 will be much better once they can get rid of the compatibility layer for other ever-gre…

I'm not comparing against Angular (which in v1 is known not to be super fast) just between browsers. I was mainly looking at https://vaadin.github.io/gwt-polymer-elements/demo/#gwt/Java... . It uses a lot of widgets on one page. Take a look how on loads in Chrome, Firefox, Edge (refresh to minimize network effects). I didn't go really deep in it, but first look was that lots of time was used in registering custom ele…

But how can you be sure the problem is not in specific element implementation? DBMonster tests show that performance in rendering is ok. FWIW - I develop on firefox with shady DOM and then test in full shadow DOM in chromium - performance was very good for us in both firefox and IE (at least for the things we used).

Re: Angular 2 Final Released

#189

I use Angular 2 in production since November 19, 2015 (alpha.46). Currently I've built 3 web apps (40, 60 and 20 components each), 3 mobile apps (with Ionic 2) and my employer have plans for more apps. Breaking changes during alpha stage were expected, so I didn't have issues with it. Most positive things I want to highlight: 1. Components are encapsulated and truly reusable (and without dependencies hell). 2. You do…

I haven't used Angular yet. From it's description it seems to be geared for making single page apps. Or a app with a few pages because it's good a binding data to an interface.

Is this accurate? What is a good use case for Angular?

Re: Angular 2 Final Released

#190
post #141
post #21

Earlier quoted context omitted.

I like the opinionated approach of NG2 over the flexibility of React because it takes a lot of decisions off of me that i am not too interested in when building a new project. I am a full stack developer leaning more towards backend in recent years and i found setting up and finding out about best practices and "what to use" for React a bit tedious, also it changes so much. The last Flux framework i used was alt.js w…

Of note, Facebook's create-react-app provides an "official' opinionated approach. https://facebook.github.io/react/blog/2016/07/22/create-apps... There's even a pull request to bring typescript into the mix. https://github.com/facebookincubator/create-react-app/pull/5...

I'm just writing a first React app, and read beforehand that it was going to be difficult to choose which libraries to use, and to get them to work together, but I haven't found that to be much of an issue in practice.

create-react-app set up all the build tooling, for a router the clear recommendation is react router, and for a flux implementation the clear recommendation is Redux. It feels like there's a well defined path for beginners. Over time you'll have to figure out how everything works, as is always the case, but you can learn more as and when it's necessary.

The bumps were more whether to use ES5 or ES6 (but then I found an official position in favour of ES6), and whether or not you need to use flux (although that was really just learning how flux worked, which wasn't wasted time).

The only uncertainty I have now is whether TypeScript will be necessary/useful in future, and if so how to integrate it.

Post reply on HN