sample plugin using restClasses and Angular js