Reol.js forked to AngularJS factory