Convert index.ect to use AngularJS