Slide 17
Slide 17 text
17
4 Isolates the data by storing it on a property of $scope that
the template cannot access, further reducing coupling, but
didn’t bind data to directives controllers.
Isolate model from $scope!
controllerAs
5 Instead of coupling to a state, directives can glue the
template and controllers together, but directives can be
tricky to write, have many options, and use $scope.
Make component like directives!
directives
3 Less coupling by mapping templates and controllers in a
state definition, limiting inheritance but still using $scope.
Link controllers and templates in states!
ui-router