finalize migration to angularjs