Modified for Angular JS Dynamic Models