Moving to angularjs