Live data from Hacker News

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

angularjs.blogspot.com

61–70 of 102 posts

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

#62
post #61

Commets here made me think about whether it's forward-looking using angular 1.0 for next projects: i guess i'll go with React with my short-coming project then... I don't know what to do

In my limited experience React is way easier to comprehend than Angular.

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

#63
post #12

Earlier quoted context omitted.

I think it's more like "syntactic" then semantic. Is syntatically valid HTML, although ng-model may not be a legal attribute name in standard HTML. On the other hand: Isn't even syntactically valid HTML. It kind of rubs me the wrong way too, although I don't know if it matters in practice, although I'm not sure it doesn't either. It does seem ugly.

I'm not sure you are correct. According to the w3 spec for HTML attributes [0], html element attribute names must consist of one or more characters other than the space characters, U+0000 NULL, """, "'", ">", "/", "=", the control characters, and any characters that are not defined by Unicode. Granted, it isn't necessarily what I'd expect to be legal, but it doesn't look illegal either. We may just need to add some l…

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

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

#65
post #18

Earlier quoted context omitted.

I had always a bad feeling about angular. The first guy I heard talking about it was like "It was made by an underdog at google" and "We often had the feeling about hitting a dead end when developing with it, but it was always because we were using it wrong" which both sounded strange to me. I used ExtJS, Ember and React. And never switched away from them because it wasn't maintained anymore. It just happened that pe…

I know what they mean when they say 'it was always because we were using it wrong'. Last place I worked used Angular 1 for their product reboot, and any time I hit a dead end I'd lookup the problem on stackoverflow only to find I wasn't doing things 'the angular way'. Generally this would be because I'd decided to mix in JQuery and alter some of the visual tree myself (something angular is meant to exclusively take c…

I have been able to combine basically any framework or library with angular for DOM manipulation and other related tasks. You just need to wrap the libraries with angular, which is fairly trivial to do for your selected subset of functionality.

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

#66
post #63
post #12

Earlier quoted context omitted.

I'm not sure you are correct. According to the w3 spec for HTML attributes [0], html element attribute names must consist of one or more characters other than the space characters, U+0000 NULL, """, "'", ">", "/", "=", the control characters, and any characters that are not defined by Unicode. Granted, it isn't necessarily what I'd expect to be legal, but it doesn't look illegal either. We may just need to add some l…

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

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

#69
post #4
post #3

Remember when we were worried about the semantic purity of our HTML.

Remember separation of concerns ? Fuck that, let's just mash code and markup together.

The fun part is that Angular (1, anyway) has pretend-separation. Sure, there's truth in DOM, but not really. Littering your custom directives all over the place may feel like progressive enhancement but if you're using an app framework like Angular your JS is likely already complex enough that you can't meaningfully consider it a mere "enhancement" -- we're talking core functionality, not fairy dust.

People react (heh) strongly to React's JSX when they first come across it but at the end of the day I find React far more honest in its approach. Your Angular templates don't really gain anything from looking like they're just HTML templates -- instead you end up either serializing your data into some kind of string format or faffing about with magical nested "scope" objects (as if JS scoping wasn't enough to keep in your head).

But in order to maintain that illusion you also have to buy into these huge layers of added complexity when writing your own directives. I'd rather go all the way back to steamrolling the DOM with Backbone templates than these pretend-semantical lumps of custom elements and attributes.

Sorry for ranting. I'm still sore about being burned by Angular.

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

#70

Earlier quoted context omitted.

I think Polymer is in Google's strategic plan and will be in much more limelight even going forward.

Polymer is a pain to use by comparison to practically everything. My understanding is it's meant as basically just a comparability layer.

Yes.

I thought everybody remembered that Polymer was originally intended to be an experiment. It was never meant to amount to much more than a bunch of glorified polyfills (and "prollyfills").

Post reply on HN