Live data from Hacker News

Angular 2 Final Released

angular.io

41–50 of 452 posts

Re: Angular 2 Final Released

#41
post #24

Earlier quoted context omitted.

That's funny; as someone familiar with React, Angular, etc., the Java ecosystem seems utterly impenetrable.

Yeah - we consult with an angular + Java group (for angular only) --- I can't understand half of what they are talking about when they talk about Enterprise level Java web projects. Java for Hadoop, Spark etc I work with daily.

Enterprise projects tend to have way more convoluted business logic and interfaces than consumer stuff -- it doesn't get nearly the love it deserves imho. Those developers, DBAs, devops folks, and sysadmins suffer sooooo much every day.

Re: Angular 2 Final Released

#42
post #23

I have been using Angular 2 for 3 months now and so far have loved it (except for the breaking changes in RC series and updating each time). Glad 2.0.0 is here. Here are the few things I loved, amongst other interesting features: 1. Typescript awesomeness: You can write plain JS or give type hints in Typescript. Typescript is awesome, because it is a superset of Javascript and compiles to Javascript. (Typescript > ES…

Awesome - thanks so much for this from a team running 1.3 in production (and looking now at moving to 2). Just curious if you are indeed saying that the built-in router allows you to do EVERYTHING you could do with ui-router (nested states / targeted views etc)? I was planning on sticking with ui-router-ng2 when we kick over to angular 2. How about testing? Was that difficult moving test suites over?

I didn't have to migrate tests over since I was started with a fresh project in Angular 2.

Angular Router does allow nested states: - https://angular.io/docs/ts/latest/guide/router.html - https://angular.io/docs/ts/latest/api/router/index/Router-cl...

I don't quite recall what "targetted views" mean?

Re: Angular 2 Final Released

#43
post #40

Earlier quoted context omitted.

FWIW as someone who struggled early on with the "How do i use angular with ?" question. It's important to IMMEDIATELY understand that the backend should not matter - so long as it returns JSON (or even XML i suppose) which AngularJS 1.x can consume with $http or $resource (or ng 2.x equivalent). This is an advantageous pattern in my opinion because the front-end angular application is totally decoupled from the backe…

Yeah, the only technology weirdness that I ran into was CORS. Making angular and x technology play nice can be a bit fun sometimes.

Yeah absolutely same here - I think we would have hit that regardless though whatever lib we used, as I think I recall the CORS stuff is all baked into the browser. So it was really just the growing pains of moving over to a SPA for us.

Re: Angular 2 Final Released

#44
post #32

Earlier quoted context omitted.

But can it compete with this? https://react-bootstrap.github.io/components.html

I think ultimately ng-bootstrap* ( https://ng-bootstrap.github.io/ ) will be better, but I'm biased. API signature looks much better than shoehorning everything into components that don't belong there - we have a lot of work to go though, so it currently is still a work in progress. * I am a part of the UI Bootstrap/ng-bootstrap team - we worked on ng-bootstrap starting back in last August/September and have the bene…

Could you elaborate on what you mean by "shoehorning everything into components that don't belong there"?

Re: Angular 2 Final Released

#45
post #23

I have been using Angular 2 for 3 months now and so far have loved it (except for the breaking changes in RC series and updating each time). Glad 2.0.0 is here. Here are the few things I loved, amongst other interesting features: 1. Typescript awesomeness: You can write plain JS or give type hints in Typescript. Typescript is awesome, because it is a superset of Javascript and compiles to Javascript. (Typescript > ES…

Awesome - thanks so much for this from a team running 1.3 in production (and looking now at moving to 2). Just curious if you are indeed saying that the built-in router allows you to do EVERYTHING you could do with ui-router (nested states / targeted views etc)? I was planning on sticking with ui-router-ng2 when we kick over to angular 2. How about testing? Was that difficult moving test suites over?

About testing: e2e test will take almost 0 efforts to migrate, unit-tests will be rewritten completely (although your code too, so nothing wrong with it).

Re: Angular 2 Final Released

#47

Earlier quoted context omitted.

FWIW as someone who struggled early on with the "How do i use angular with ?" question. It's important to IMMEDIATELY understand that the backend should not matter - so long as it returns JSON (or even XML i suppose) which AngularJS 1.x can consume with $http or $resource (or ng 2.x equivalent). This is an advantageous pattern in my opinion because the front-end angular application is totally decoupled from the backe…

This is great advice! What do you think about routing? angular has it's own router, so can Go have. What to choose?

I can only tell you what I know from experience:

We use angular as an MVW for front-end We use django + django-rest-framework for back-end.

It's important to understand that "routing" in angular is a bit "synthetic" - it's not actually requesting much from the server after index.html loads (it only changes address etc as part of the routing). So the routing is totally separate on the front-end, assuming you are using a back-end to provide the data.

Re: Angular 2 Final Released

#48
I evaluated React and Angular 2 several months ago and picked React. Some of the issues I found in Angular 2:

The HTML template in Angular 2 is stored in a string. This has several disadvantages:

1. Editors can't do syntax coloring.

2. Editors can't do auto-indenting.

3. Editors can't offer "intellisense" suggestions.

4. Editors can't match tags.

You embed variables in this template string like this: '{{hero.name}}'.

This means:

1. Compilers can't find typos or find syntax errors at compile time.

2. If you make a typo in the variable name you don't get a compile-time or run-time error, instead the value is simply not displayed!

3. Tools can't refactor (i.e., rename) variables embedded inside the template.

4. No intellisense for the embedded expressions.

You have to learn weird syntax such as ngFor whereas in React you just use a JavaScript for loop.

In React you embed HTML inside the TypeScript and VisualStudio treats both the HTML and the TypeScript as first-class citizens. You get compile-time checks and intellisense for both the HTML and the TypeScript code! You can even put breakpoint inside the template and step through loops whereas in Angular you can't step through an ngFor.

Note that some of the above may have changed since I last looked at Angular 2.

Re: Angular 2 Final Released

#49
I'd be interested to hear people's experiences with running Angular 1 and 2 side by side in the same application for the purposes of incrementally migrating an Angular 1 codebase.
Post reply on HN