What makes Angular a BAMF?
(Bad Ass Mother Framework)
- Two Way Data-binding
- HTML Templates
- Dependency Injection
- Model View Controller (MVC)
- Deep linking
- Directives
- Testable
Two Way Data-binding
Simply put, you can bind DOM values to your JS.
HTML Templates
Includes
PHP has the include function but so does Angular.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/mattwebb-1/images/60705/includes.png)
Repeats
Dependency Injection
You are injecting something that your function depends on to complete its work. It's that simple.
Model View Controller (MVC)
Angular has its own spin on the MVC pattern that is especially well suited for JS.
-
Smaller bite size chunks
-
Better Organization
- Easier Scalability
- Not familiar with MVC pattern?
Deep Linking
Angular has an amazing built-in support for deep linking.
- Easy to setup Routes
- Try to go to "/pizza/locations"
- Route will serve up the correct template for the URL
- Uses HTML 5 history API
- Fall backs to hashbang URL's, Looking at you IE!
Directives
-
Teaching HTML new tricks
- They're encapsulated templates and code that are now reusable components.
That function will invoke when the following HTML is used
Testable
-
Angular was written with testability in mind
-
They have made it super easy to test
- Can use Karma test runner + Jasmine
- There is a great talk after this talk by Jake Gibbons "Failing Test on Purpose"