r/angularjs • • May 31 '16

Angular 2 website (angular.io) is written in Angular 1.4.8

https://github.com/angular/angular.io/blob/5a0a0160ce365370640a11229a6d32f1a510206e/public/_includes/_scripts-include.jade#L10-L12
47 Upvotes

17 comments sorted by

36

u/JustVashu May 31 '16

why rewrite the site if it's already working?

8

u/NYKHouston43 May 31 '16

I agree. If anything, this website itself is more of a display of how angular material works than angular 2. Plus, the angular 2 material library isn't even close to complete.

0

u/[deleted] May 31 '16

[deleted]

4

u/JustVashu May 31 '16

Last time I checked angular was still there.

4

u/Otter_in_Jeans May 31 '16

They are entirely different things.

16

u/ADHDengineer May 31 '16

Angular 1 is not broken. There's no problem writing a new app in angular 1.x or continuing your app in 1.x for the foreseeable future. The JS runs today, it'll run tomorrow (for a few years anyways). Angular 2 just brings about improvements to problems that experienced 1.x developers have had to work around.

10

u/toddmotto May 31 '16

It's not on their top priority list to rewrite it in Angular 2 "just because" right now. No doubt it'll happen post-release of stable :)

-6

u/[deleted] May 31 '16

But wouldn't many people try to learn from their site on how to develop things?

Sites of frameworks are great ways for you to learn more about them. So it should be changed pre-launch imo

8

u/toddmotto May 31 '16

For sure, but the docs aren't even half complete yet, displaying the data is top priority, rather than what's being used to display it IMO.

2

u/DOG-ZILLA May 31 '16

Bit odd: They're using Jade for script tags, but not for Firebase or AngularFire scripts. :\

0

u/[deleted] Jun 01 '16

[deleted]

2

u/cwallen Jun 01 '16

I'm not connected to the angular team so I'm not speaking to their choices, but I like jade mostly for the syntax style. It's a lot easier to spot bad indentation than to figure out which closing tag got dropped or misplaced. There are a lot of advanced features of jade we do not use. Any of the features that overlap with angular (includes, iteration, inheritance), we just use angular. The jade templates are also all complied all on the server during build, not on the browser.

0

u/[deleted] Jun 01 '16

[deleted]

1

u/cwallen Jun 01 '16

Primarily I just find the syntax faster to write and less error prone.

The only other feature I can think of would be string interpolation. Escaping html entities on compile makes it easier to write and read. Can also pull a repeated phrase to the top of the file to DRY things out a bit, for cases that don't warrant a sub component or angular constant.

My big rule would be every template is self contained. One jade file complies to one html template, and don't try to pull in any external data. The only violation of that I do is adding environment config variables to the index file to let angular access them.

2

u/[deleted] May 31 '16

I bet the website was started when Angular 2 was nowhere near ready, so this makes complete sense.

1

u/rk06 Jun 04 '16

it is done so they can practice 1.x -> 2.0 migration when 2.0 is released. (Maybe)

-4

u/CaptaincCodeman May 31 '16

While there's nothing wrong with a web site not using the web framework it's promoting, it's a little disappointing that they are not 'dog-fooding' their own framework especially now it's at the "release candidate" stage.

It would be more impressive if the Angular 2 site showed off some of the Angular 2 features such as server-side rendering. It's not even a Single Page App which is why it's likely using Angular 1 which seems more suited to augmenting existing content than Angular 2 is.

10

u/[deleted] May 31 '16

[removed] — view removed comment

5

u/SpikeBolt May 31 '16

Of course it is. Angular 2 didn't exist when that website was created.

Neither did 1.4.8 :P

/s