Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created January 12, 2016 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeaholicguy/509e1451b9f73cb0a302 to your computer and use it in GitHub Desktop.
Save codeaholicguy/509e1451b9f73cb0a302 to your computer and use it in GitHub Desktop.
app.directive('productPanels', function(){
return {
restrict: 'E',
templateUrl: 'product-panels.html',
controller: function () {
this.tab = 'description';
this.setTab = function (tab) {
this.tab = tab;
};
this.isSelected = function (tab) {
return this.tab === tab;
}
},
controllerAs: 'panel'
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment