floor factory in angularjs

good to review