Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercise17 readme fix #47

Open
wants to merge 1 commit into
base: exercise17
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#Exercise 17: An alternative approach to controllers
# Exercise 17: An alternative approach to controllers

##Summary
## Summary
An alternative approach to controllers assumes that the function should be assigned to the controller, not to the $scope.
Create `SumCtrl` and `SubCtrl` providing the basic math sum (`addition`)and subtract (`subtraction`) functions according to the requirements.

##Goals
## Goals
* `Calc.js` should contain `SumCtrl` and `SubCtrl` controllers
* `SumCtrl` should have the `addition` function assigned to itself
* `addition` should consume two arguments and assign the result to `sum` variable
* `SubCtrl` should be like `SumCtrl` but should have `subtraction` function and assign the result to `sub` variable instead
* each controller should have two variables (`firstNumber`, `secondNumber`) initialized with values **12** and **1**
* use `addition` and `subtraction` function to display the result in correct header (check comments)

##Before you start, please refer to:
## Before you start, please refer to:
* [angularjs-an-alternative-approach-to-controllers](https://egghead.io/lessons/angularjs-an-alternative-approach-to-controllers)

##Setup
## Setup

###To install dependencies
### To install dependencies

```
yarn install
Expand All @@ -27,16 +27,16 @@ yarn install
bower install
```

###To start application in live reload mode
### To start application in live reload mode

grunt serve

###Jshint
### Jshint
To run verify jshint:

grunt jshint:default

###Run tests
### Run tests

To unit tests in development mode:

Expand Down