migrate to angularjs