Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
robwormald
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
31.
▲
by
robwormald
10y ago
Angular core team member here, let me see if I can clarify some of our decisions here: It's not a secret that we promote Typescript as the first choice for Angular2 - this is a conscious decision based on both technical reasoning as we
32.
▲
by
robwormald
10y ago
we can do both. In JIT mode, we XHR for them and compile them on the fly. In AOT mode, we do that at build time and turn the templates into TS code, which we can then typecheck (thus giving you typechecking against templates) - the benefit
33.
▲
by
robwormald
10y ago
Should be noted that UI-router supports ng2 as well (and React!)
34.
▲
by
robwormald
10y ago
Because of projects like https://www.nativescript.org/nativescript-is-how-you-build-n... We also have a (community) react-native bridge, and of course all the awesome html5 stuff from Ionic.
35.
▲
by
robwormald
10y ago
We're all going to get a couple of nights sleep, but that project is in progress and should be out soon. We're making sure it shows off the best of ng2.
36.
▲
by
robwormald
10y ago
This was great. I'm an Ask, and my girlfriend is a Guess, and darn it drives me crazy sometimes, but i've never been able to quite pinpoint what it was... this puts it into words nicely. Cheers!
37.
▲
by
robwormald
10y ago
Typescript doesn't directly, but Angular2 does (or will, this is just coming online) - our offline compiler converts your html templates into TS, and then regular TS typechecking can take over. See https://github.com/mi
38.
▲
by
robwormald
10y ago
Honestly? Yes. We support ES5 but strongly recommend using Typescript with Angular2. Do you use ES6? If so, you already know how to use Typescript.
39.
▲
by
robwormald
10y ago
Posted today https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-f...
40.
▲
by
robwormald
10y ago
yep, this method works great for libraries authored in typescript (and/or those that take the time to provide external module-style typedef files), but the @typings would be for what tsd/typings does today (mostly ambient)
41.
▲
by
robwormald
10y ago
see https://github.com/Microsoft/TypeScript/issues/8275
42.
▲
by
robwormald
10y ago
The great irony of this (and fwiw, I completely agree, and I work on the angular core team...) is that by embracing platform features in ng2 we've opened up a mess of other issues to learn. A good example of this is modules. Angular 1
43.
▲
by
robwormald
10y ago
The two things coming in 2.0 that most excite me are - moving types to npm (despite the great work of Blake on typings, managing type definitions is still out of band) - npm install @types/somelib will be great. - AST transforms, which
44.
▲
by
robwormald
10y ago
Your tsconfig file should have that option set (as well as emitDecoratorMetadata).
45.
▲
by
robwormald
10y ago
As an aside, angular2 is just coming online and there's a big interest from our community on redux, so you might share into that community too. The fact radical is written in TS means it's a great fit :)
46.
▲
by
robwormald
10y ago
I'd suggest using the --outDir option, so TS writes the .js files to a different directory which you can easily blow away.
47.
▲
by
robwormald
10y ago
Angular 1.x has been around since 2009 - 7 years - that predates pretty much every framework in use today, before modules (commonJS, let alone ES6) were widely in use, etc. At some point, we had to make a decision to be forward looking towa
48.
▲
by
robwormald
10y ago
WebStorm has been pretty amazing in keeping up with us, a fair number of our team use it. Even more exciting is upcoming tooling integrations we'll get from Typescript - there's a cool GIF in this issue tracking the work https:&#
49.
▲
by
robwormald
10y ago
The new npm packages have an ES6 directory included and use the jsnext:main pointer in their package.json files to allow rollup-plugin-node-resolve to pick up the ES6 distro as normal. I'll drop a note in that issue later this week aft
50.
▲
by
robwormald
10y ago
This really comes down to your team - try them out and see what feels good for you. React is a great library, and as an angular1 dev before joining the core team, I learned a TON from playing with React and especially Dan Abramov and Redux
51.
▲
by
robwormald
10y ago
This was the case in Angular 1 - in Angular2, not so much. The component-tree structure (much like React) allows far smarter optimization on change detection - both with immutable data structures and observables - entire subtrees of compone
52.
▲
by
robwormald
10y ago
i like Max Lynch's (of Ionic framework) take on this http://blog.ionic.io/angular-is-a-design-pattern/
53.
▲
by
robwormald
10y ago
err... 2.0
54.
▲
by
robwormald
10y ago
re 1.0, when it's done :D
55.
▲
by
robwormald
10y ago
couple of reasons. one big one is flexibility. angular2 (er, @angular) runs on client, server, native (react native/nativescript) and we hope many other platforms in the future. this lets us packages for common dependencies for various
56.
▲
by
robwormald
10y ago
Lots more work to do here, but we're pretty happy with how the core looks! For those worried about size (which has absolutely been a fair concern over the alpha/beta process) - here's a "hello world" built with Roll
57.
▲
by
robwormald
10y ago
Angular core team member here, happy to answer questions
58.
▲
by
robwormald
11y ago
Heh, not exactly. We have a finite amount of hours in the day, and maintaining a JSX implementation is something we just aren't really interested in. You're more than welcome to implement such a thing yourself though, and I'd
59.
▲
by
robwormald
11y ago
That's how RxJS 5 is set up, fwiw.
60.
▲
by
robwormald
11y ago
seriously, not offended :) you get used to it working on frameworks :D The longest (heated) discussion ever covers a lot of the reasoning: https://github.com/angular/angular/issues/133 More in depth design st
More ›