You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -414,4 +414,21 @@ Here are some methods:
414
414
3. `path()` returns the path the app is currently at.
415
415
4. `search()` allows us to get a key value pair for the queries passed in.
416
416
5. `url()` returns the path and the query parameters.
417
-
*Note that `path()`, `search()` and `url()` are also setters for the same property.
417
+
*Note that `path()`, `search()` and `url()` are also setters for the same property.*
418
+
419
+
- [ ] To Do The Route Life Cycle
420
+
421
+
### Interesting things to know
422
+
Here are a few things I felt like covering to give us a nice break from the very serious factory, provider, module, routing stuff we have been getting into
423
+
#### `$resource`
424
+
*This has a dependancy ngResource*
425
+
The `$resource` is a wrapper for using an API. We create a resource by calling `$resource(url, parameters, actions, options)`
426
+
1. **url** contains a parameterized version of the URL we are going to interact with. For example it can be: `http://www.myexample.com/data.json` or `http://www.myexample.com/api/user/:id`.
427
+
2.**parameters** sets default parameters that we are going to pass into the object. From what I see the most likely use case is with the `@`parameter. This will be elaborated later.
428
+
3.**options** Will be discussed later
429
+
4.**actions** will be discussed later
430
+
This makes our code easier to deal with by only dealing with objects and not with repeated instances ofurls. We must note that `$resource` depends on `$http` which will be discussed shortly.
431
+
432
+
#### `ngAnimate`
433
+
Animations in AngularJS require us to inject a special module known as `ngAnimate` which adds special classes to elements that can be animated in special ways. In [08-0-ngAnimate.html](https://github.com/zafarali/learning-angular/blob/master/08-0-ngAnimate.html) we see three separate cases of how these are done using CSS.
434
+
The key thing to remember here is that while the animation is being executed (i.e the transitions and the animations), the classof the element will have `.ng-enter-active`.
0 commit comments