An Angular 2 Hello World Web Site

Angular 2 is a YAJF — yet another JavaScript framework. I’ve worked with the older AngularJS framework but hadn’t worked with Angular 2 so I thought I’d take a look.

angular2helloworlddemo

From my perspective, Angular 2 is really an entire programming language that ultimately gets translated down to ordinary HTML and JavaScript. So why not just write HTML and JavaScript directly? That’s a very good question.

In my opinion, Angular 2 is only useful when you have a seriously complex Web application. The learning curve for Angular 2 is enormous, the code base is highly volatile and so there’s a high likelihood of incompatible code, and there are a huge number of dependencies.

In short, I am not a fan of Angular 2, but I don’t have any arguments for people who want to use it.

You don’t download and install Angular 2 directly. Everything is done using the NodeJS framework, so that’s what you install. Then, to manage Angular 2 projects, I installed the angular-cli command line interface program.

I created a simple Angular 2 project using angular-cli:

> ng new HelloWorld

Then I fired up a local development Web server:

> ng serve

And then I launched a browser and navigated to the home page of the project at http://localhost:4200 and everything worked.

However, when I looked at the HelloWorld project I found there were 22,171 files using 137 MB of storage. What!? Well, almost all the files are libraries that aren’t being used by the project, but still, this is just crazy.

angular2files

This entry was posted in Miscellaneous. Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s