Service & Factory
Purpose:
Serves as a Model for Data
Useful functions for Data Manipulation
Helps in:
Seperation of concern
Function Re-use in controllers, filters, directives etc.
First Controller
Square: {{f.numberSquare(f.number)}}
Cube: {{f.numberCube(f.number)}}