Adding to the Component Pattern in relation to AngluarJs and taking excerpts from this article: component-paradigm
Quick review... The importance of controllerAs and bindToController property in your directive / component.
bindToController
In summary, the bindToController property helps in situations where we want to pass something to the directive’s isolated scope from parent component. When used, properties from isolated scope will be automatically bound to controller’s this.
The example below is referencing an inline template instead of a templateUrl in the ui-router state configuration.