These exercises are meant to accompany a beginner to intermediate level angularjs course.
git clone https://github.com/rachelhathaway/mm-angular-training.git
cd mm-angular-training
bower install
python -m SimpleHTTPServer
Checkout a step with git checkout xx
where xx
is the step number.
- Declare app, controllers, services, filters, and directives modules.
- Add angular-route.js to the project. Inject it into the app.
- Add the config() method to the main app.
- Inject $locationProvider and $routeProvider into the config method.
- Using $locationProvider, enable html5Mode.
- Using $routeProvider, add your first route. Set the templateUrl to views/index.html.
- In views/index.html, add the ng-model attribute to each text field
- Update the string expression preceding each field to reference its field’s ng-model value
- Change the heading text on form submission
- Add a new controller, AppCtrl, to controllers.js
- Inject the controller module into the app module
- Make your controller available to views/index.html
- Modifying views/index.html, move the initialization of 'heading' to the controller
- Move the expression from the form's ng-submit attribute to a function in the controller. Make sure the function is available to the template and is called on ng-submit.
- Add a new controller, ClockCtrl
- Using the $interval service, output the time to the view in hours:minutes:seconds format, updating every second
- Convert a string into pig latin using a filter.
- Given a .json file with a set of articles, create an article directive that outputs the title, body, author, and date of each article.
- Your directive should have isolate scope and use templateUrl.