Custom Component
app.directive('tableList', function() {
var directive = {
scope:{
//use attribute pass datas to here, scope property
listDatas: '='
},
restrict: 'E',
template: ...,
bindToController: true //bind scope property to controller,
controller: function(){
//Business Logic here
},
controllerAs: 'ctrl'
};
return directive;
});