Skip to content

Commit

Permalink
add component id if one is not provided. This will allow for interact…
Browse files Browse the repository at this point in the history
…ion with group and injectable $panel
  • Loading branch information
Ben Rubin authored and Ben Rubin committed Jul 15, 2016
1 parent 97d62d8 commit e9e3637
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/js/expansionPanel.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ function expansionPanelDirective() {
vm.registerHeader = function (ctrl) { headerCtrl = ctrl; };
vm.registerFooter = function (ctrl) { footerCtrl = ctrl; };


if ($attrs.mdComponentId === undefined) {
$attrs.$set('mdComponentId', '_expansion_panel_id_' + $mdUtil.nextUid());
}

vm.$element = $element;
vm.componentId = $attrs.mdComponentId;
vm.expand = expand;
Expand Down

0 comments on commit e9e3637

Please sign in to comment.