Custom Components in AngularJS — a practical guide to AngularJS custom components with clear examples you can reuse in real projects.
AngularJS Tutorial Series (84/99). Prefer one article? Read the complete AngularJS tutorial.
Short description
Components default to isolate scope and controller-as $ctrl.
component()
angular.module('myApp').component('userCard', {
bindings: { user: '<' },
templateUrl: 'views/user-card.html',
controller: function () {
var $ctrl = this;
}
});