Angular 2 thought snippets

Posted on

Why is TypeScript default.
Well… it’s the designated Angular 2 official language, it even comes with a whole mini-history behind it, the AtScript/TypeScript merger.

I don’t want to learn TypeScript, it’s a dirty transpilation language.
Yeah well, JavaScript for Angular 2 honestly isn’t better. Architecturally, Angular 2 doesn’t budge on design and so the plain JavaScript ES2015 syntax consists of monkey patches. TypeScript is the lesser of the two evils. It is also a pain in the butt to need the overhead of a transpilation server.

This requires a lot more setup than Angular 1.
Sort of a rant here. Best practices suggest you need NPM to get the Angular 2 stuff (which is untrue, especially if you want to keep it lightweight). Then you use an auto loader, which requires its own little army of files (and is a new JS concept for me). And this in turn calls the bootstrapper (you must explicitly bootstrap in Angular 2) which needs modules and components in all the right places. Gah!

Bring back the old search though.
The Angular 1 website had a nice search feature where you hit “/” and activated the search box. Also it returned hits in a mega menu which was nice as well.

Give me a boilerplate. Does anyone have a boilerplate please.
Ended up making my own… here.

Not sure if I’ll use the weird-looking grammar for bindings or stick to English.
I think I will warm up to these soon. The downside is that it obfuscates HTML for those not accustomed to Angular 2, and that is not a good thing.