Migration to angularjs