Tag Archives: getting started

How to install and setup AngularJS 2 with SASS/SCSS and Bootstrap boilerplate easily

Hooray, AngularJS2 is officially released, which means it will officially be the tool of choice to build websites for me from now on.

Infact, I already started working on it.

Unfortunately, after many tries with various boilerplates/methods, they were all super complicated and more importantly, failed at some point of set up.

Thankfully, I found a easy and quite fool-proof way to automatically generate an angularJS2 seed project with best practises and testing all built in, SCSS/SASS support and installing bootstrap in only a few steps.

Angular-CI.

It’s funny why angular-ci wasn’t really advertised much in the angularJS docs, I only found out about it from Maximilian Schwarzmüller‘s udemy angularjs2 course.

Anyway, refer to https://github.com/angular/angular-cli to get started with angular-ci.

You can also use angular-ci to generate directives, components, what-nots.

 

Setting up the environment for AngularJS 2

First things first, when setting up angularJS 2 on OSX for the first time, you need to install two things:

  1. Typescript
  2. Typings

Install Typescript by running
sudo npm install -g typescript

Install Typings by running
sudo npm install -g typings

What is Typings you ask?

Typings is a module for Typescript that lets you use external javascript plugins, ‘natively’ in Typescript. Doing so will make them fully compatible.