The Spotyngular Project: Part 2 – Adding AngularJS, SystemJS & NPM
This is the third post of “The Spotyngular Project” series of posts. Throughout this series, we are cloning spotify with AngularJS 2 to expose this framework’s benefits and tricks.
Basic HTML
First, create a project folder. Now let’s start creating the basic index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Spotyngular</title>
<!-- css area -->
</head>
<body>
<!-- script area -->
</body>
</html>
As you can see this is the basic index.html, we’ve already discussed 4 different ways to download it and start using AngularJS. We’ll choose the simplest method: downloading the source file directly from http://code.angularjs.org
Adding AngularJS
We’ll be working with the version alpha-28 so the file to be used ishttps://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js
Because we’ll work with Typescript we need to include Traceur and SystemJS as dependencies. Traceur is needed by the core because it uses some ES6 features that Traceur Runtime transpiles for us. And SystemJS will help us load all the ES6 module so we won’t need hundreds of script tags in our html anymore.