controller as for categories-controller.js
refactored controllerAs, johnpapa style guide, SOC, added service layer