Update templates, layouts and the js for angularjs