Closed Michael-Dawkins closed 8 years ago
I will add an isExpanded function to the exapnsionPanelService and scope $panel object. I will post an example with the update
That is great news, thank you!
added an isOpen function to the panel service and directive
expansionPanelCtrl.isOpen()
<md-expansion-panel>
<md-expansion-expanded>
<div ng-if="$panel.isOpen()"></div>
</md-expansion-expanded>
</md-expansion-panel>
if added through the $mdExpansionPanelGroup service and controller is assigned
angular.module('app').controller('panelCtrl', function ($panel) {
$panel.then(function (instance) {
instance.isOpen();
});
});
I could not find a way to let a panel content know if it is currently being displayed or not. Because of this, I cannot apply ng-if to heavy panel content.
I tried to decorate with a directive of my own, but it does not work when the panel is opened via keyboard navigation.
Do you plan on exposing this state ?
Thank you