An alternative approach to controllers assumes that the function should be assigned to the controller, not to the $scope.
SubCtrl providing the basic math sum (
addition)and subtract (
subtraction) functions according to the requirements.
SumCtrlshould have an
additionfunction assigned to itself
additionshould consume two arguments and assign the result to
SubCtrlshould be like
SumCtrlbut should have
subtractionfunction and should have the result assigned to
secondNumber) initialized with values 12 and 1
subtractionfunctions to display the result in the correct header (check comments)
npm install bower install
To run jshint:
To run unit tests in development mode:
To run jshint, tests and coverage: