a angularJS rewrite of my resourcePlan