Since Angular v1.4, it's possible to do this:
scope: {},
bindToController: {
name: "="
}
instead of old way of doing:
scope: {
name: "="
},
bindToController: true
Except being more intuitive, is there any difference between them?
Think about bindToController as a migration path for future version of Angular.
We prefer to write directives (or components) with isolated scope and bind to controller the properties you want to pass.
Binding variables from scope will gradually disappear.
In the new release of angular (1.5) you don't need to use scope or bindToController, because the scope is isolated for default and for bind variables to controller you can use bindings.
This is also useful for preventing $scope use. Read this article if you want more info about that: https://toddmotto.com/no-scope-soup-bind-to-controller-angularjs/