Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Angular: Directive controller
// Custom directive controller
app.directive("productPanels", function(){
return {
restrict: 'E',
templateUrl: 'product-panel.html'
controller: function() {
// Controller logic
},
controllerAs: 'panels'
};
});
---
In index.html
<product-panels></product-panels>
---
Partial product-panel
<section>
...
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.