Live data from Hacker News

Angular 1 and Angular 2 integration: the path to seamless upgrade

angularjs.blogspot.com

91–100 of 102 posts

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#91
post #43

Seeing a lot of comments about how Angular had no migration plan. Migration was discussed at length at ng-conf back in March, including a large portion of the keynote(s). They made it very clear a smooth and simple migration was top priority. Part of migration talk in keynote: https://youtu.be/QHulaj5ZxbI?t=12m43s Full playlist: https://youtu.be/QHulaj5ZxbI?list=PLOETEcp3DkCoNnlhE-7fovYvq...

Yes, it is a considerable frustration. At the beginning, the Angular team said something along the lines of "we are working on a Angular 2, after we figure out how it should work then we will consider migration and come up with a plan". For some reason this was widely interpreted as "there will be no migration plan".

I agree that there were a lot of misunderstanding going around but it has caused some problems. For new projects you have to choose a platform/framework. If you choose Angular 1 you might have to learn it and release a version of your app with it before Angular 2 is released or just before the migration path is clear. And it is till hard to estimate the migration cost/time. Or you could start with Angular 2 which you knew was not ready. It was and is also unclear exactly when Angular 2 will be "ready" making it a less interesting choice if you have/had a hard date when your app should be released.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#92
post #7

I know that hating angular is popular these days, but i'm still using it, and it serves me well. Looking forward to Angular 2!

Yeah, it seemed that way because there was no migration path... That is fixed though ;) Almost everyone i know is using something in the likes of AngularJS

> Almost everyone i know is using something in the likes of AngularJS I do wonder what you mean with that. I think that both React and Ember are different but if you mean a javascript framework for building single page applications you're probably right.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#93
post #57

Every time I use Angular it feels like it's doing things the right way and it's becoming the Rails or Django of the JavaScript world. Wish I had fought to use AngularJs directives and $resource instead of messing about with ReactJS and jQuery ajax calls. With this migration plan it seems silly not to keep hacking with AngularJS 1.x

If you're using React you could look into different flux frameworks or even Relay+GraphQL to avoid jQuery ajax (or at least hide it). That last thing is the bleeding edge right now but looks promising. Flux is probably here to stay and you have a ton of libraries to choose from. I started with Reflux but is now using Alt.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#94
post #47

One of the biggest benefit of Angular is the vast amount of libraries built on it, like bootstrap-ui and ui-grid to name a few, how can we switch to Angular 2 until the most adopted ones don't switch too? (real question)

Or the biggest failure. I guess that's how we get 5MB pages which could be done without any JS at all.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#95
post #63

Earlier quoted context omitted.

It's illegal. Go to your console and type el.setAttribute("(foo)", "bar") and see what happens.

No it is not. See the discussion here: https://github.com/angular/angular/issues/133

What there contradicts what I said? I'm aware of innerHTML hacks that make it possible to work around but those are not valid attribute names. I'm not even against the syntax; i like it, but that doesn't change the fact that it is invalid html.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#96
post #95

Earlier quoted context omitted.

No it is not. See the discussion here: https://github.com/angular/angular/issues/133

What there contradicts what I said? I'm aware of innerHTML hacks that make it possible to work around but those are not valid attribute names. I'm not even against the syntax; i like it , but that doesn't change the fact that it is invalid html.

Parent quotes the W3 Spec to prove that it's legal, and your response is "it's illegal because $BROWSER say's so"?

I trust the spec more than an implementation.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#97
post #95

Earlier quoted context omitted.

What there contradicts what I said? I'm aware of innerHTML hacks that make it possible to work around but those are not valid attribute names. I'm not even against the syntax; i like it , but that doesn't change the fact that it is invalid html.

Parent quotes the W3 Spec to prove that it's legal, and your response is "it's illegal because $BROWSER say's so"? I trust the spec more than an implementation.

The parent didn't quote the spec, they quoted a GitHub issue with 71 participants. If you want to post a link to the spec text please do.

If true I'm not sure it matters if every browser throws an exception.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#98
post #97

Earlier quoted context omitted.

Parent quotes the W3 Spec to prove that it's legal, and your response is "it's illegal because $BROWSER say's so"? I trust the spec more than an implementation.

The parent didn't quote the spec, they quoted a GitHub issue with 71 participants. If you want to post a link to the spec text please do. If true I'm not sure it matters if every browser throws an exception.

User pfooti's comment referenced the specification[1]. You said that a browsers' implementation of the DOM API proves that it is illegal. I then linked to an issue with a detailed discussion of how the DOM API isn't consistent with itself, much less the HTML specification.

[1]:http://www.w3.org/TR/html-markup/syntax.html#syntax-attribut...

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#99
post #90
post #81

Earlier quoted context omitted.

Not that smooth if you saw the comments on HN last week - teams lost months of productivity keeping up with the rewrites in Ember, even with no immediate breaking changes.

Can I have a link to that please?

https://news.ycombinator.com/item?id=10054717

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#100
post #57

Every time I use Angular it feels like it's doing things the right way and it's becoming the Rails or Django of the JavaScript world. Wish I had fought to use AngularJs directives and $resource instead of messing about with ReactJS and jQuery ajax calls. With this migration plan it seems silly not to keep hacking with AngularJS 1.x

If you're using React you could look into different flux frameworks or even Relay+GraphQL to avoid jQuery ajax (or at least hide it). That last thing is the bleeding edge right now but looks promising. Flux is probably here to stay and you have a ton of libraries to choose from. I started with Reflux but is now using Alt.

GraphQL requires backend infrastructure to use, which takes time usually to plug into the planning pipeline.
Post reply on HN