Assume we have this JS code:
.directive('myCustomer', function() {
return {
template: 'Name: {{customer.name}} Address: {{customer.address}}'
};
});
and html code:
<div my-customer></div>
Can anyone tell me why we are matching directive with div using my-customer while we don't have this name anywhere in the code?
above code is from hereDeveloper Guide / Directives