add form check and basic angularjs controller