Updating angularjs  to make https requests