Skip to content

Commit 801f1d7

Browse files
New curriculum
1 parent e971e4c commit 801f1d7

File tree

3 files changed

+49
-49
lines changed

3 files changed

+49
-49
lines changed

day_2/README.md

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -26,38 +26,4 @@ app.controller("userListController", function($scope, $http) {
2626
- In this lab we will be using Angular to send a GET request to pull a list of wines.
2727
- Set up a new Angular project and try to make a GET request to `http://daretodiscover.herokuapp.com/wines`.
2828
- Use the front end provided [here](wine_manager_html/) to display the wine data on the page.
29-
- Make a POST request to the same url with the data from the add wine modal window form.
30-
31-
##$routeProvider
32-
- Routes allow you to add multiple page functionality to your app.
33-
- Views are triggered via the location hash.
34-
- Routes are set up on the application configuration:
35-
36-
```javascript
37-
app.config(["$routeProvider", function($routeProvider) {
38-
$routeProvider
39-
.when("/wines", {
40-
templateUrl: "templates/wine-list.html",
41-
controller: "wineCtrl"
42-
})
43-
.otherwise({
44-
redirectTo: "/wines"
45-
});
46-
}]);
47-
```
48-
49-
- In order to use this new ngRoute module however it has to be one of our dependencies in our module setup:
50-
51-
```javascript
52-
var app = angular.module("wineApp", ["ngRoute"]);
53-
```
54-
55-
#####Accessing route parameters
56-
57-
- In order to access parameters that are passed into a URL, you will need to inject $routeParams into your controller:
58-
59-
```javascript
60-
app.controller("wineCtrl", function($scope, $http, $routeParams) {
61-
console.log($routeParams.id);
62-
});
63-
```
29+
- Make a POST request to the same url with the data from the add wine modal window form.

day_3/README.md

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,41 @@
1+
##$routeProvider
2+
- Routes allow you to add multiple page functionality to your app.
3+
- Views are triggered via the location hash.
4+
- Routes are set up on the application configuration:
5+
6+
```javascript
7+
app.config(["$routeProvider", function($routeProvider) {
8+
$routeProvider
9+
.when("/wines", {
10+
templateUrl: "templates/wine-list.html",
11+
controller: "wineCtrl"
12+
})
13+
.otherwise({
14+
redirectTo: "/wines"
15+
});
16+
}]);
17+
```
18+
19+
- In order to use this new ngRoute module however it has to be one of our dependencies in our module setup:
20+
21+
```javascript
22+
var app = angular.module("wineApp", ["ngRoute"]);
23+
```
24+
25+
#####Accessing route parameters
26+
27+
- In order to access parameters that are passed into a URL, you will need to inject $routeParams into your controller:
28+
29+
```javascript
30+
app.controller("wineCtrl", function($scope, $http, $routeParams) {
31+
console.log($routeParams.id);
32+
});
33+
```
34+
135
##Wine List Lab Part 2
236
- In this part we will use routing to full data about a specific wine and render the edit page.
337
- Here are the steps you will need to follow:
438
- Step 1: Create a route to `/edit/:id`.
539
- Step 2: Use the route parameter to make a GET request to `http://daretodiscover.herokuapp.com/wines/:id`.
640
- Step 3: Display wine data in the form on edit.html.
7-
- Step 4: On submit of the form create a PUT request to the same URL as above to update the wine record.
8-
9-
##ngAnimate
10-
- ngAnimate is a module that allows us to perform animations on elements selectively.
11-
- This functionality requires the ngAnimate module from the Angular extras.
12-
- Let's take a look at the documentation [here](https://docs.angularjs.org/api/ngAnimate/).
13-
- Animations work by applying the `.ng-enter`, `.ng-enter-active`, `.ng-leave`, or `.ng-leave-active` classes on any of your existing classes.
14-
- Your classes should implement some sort of CSS3 animation.
15-
- Let's try this out with some pre-built css classes to help us out: https://github.com/Augus/ngAnimate.
16-
17-
##Wine List Lab Part 3
18-
- In this part of the lab we will implement some animations between views.
19-
- Use your existing application and create an animation between the wine list and the edit view.
20-
- Experiment using different CSS3 properties.
41+
- Step 4: On submit of the form create a PUT request to the same URL as above to update the wine record.

day_6/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,18 @@ app.filter("multiply", function() {
2626
});
2727
```
2828

29+
##ngAnimate
30+
- ngAnimate is a module that allows us to perform animations on elements selectively.
31+
- This functionality requires the ngAnimate module from the Angular extras.
32+
- Let's take a look at the documentation [here](https://docs.angularjs.org/api/ngAnimate/).
33+
- Animations work by applying the `.ng-enter`, `.ng-enter-active`, `.ng-leave`, or `.ng-leave-active` classes on any of your existing classes.
34+
- Your classes should implement some sort of CSS3 animation.
35+
- Let's try this out with some pre-built css classes to help us out: https://github.com/Augus/ngAnimate.
36+
37+
##Wine List Lab Part 3
38+
- In this part of the lab we will implement some animations between views.
39+
- Use your existing application and create an animation between the wine list and the edit view.
40+
- Experiment using different CSS3 properties.
41+
2942
##Q&A
3043
- Let's answer some of your questions on Angular!

0 commit comments

Comments
 (0)