switch to use angularjs