add promise and di for angularjs