Making create and delete angularjs functions work.