Implementing angularJS promise for create/update plan - WIP