Created
October 8, 2014 18:36
-
-
Save vienhoang/c91a9b816436fc667ad1 to your computer and use it in GitHub Desktop.
Angular: Directive controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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