This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
md-list-item - Cannot read property 'hasAttribute' of undefined #2337
Closed
Description
Hello,
The following code, which worked before I just upgraded to v0.9.0-rc1, is now throwing: typeError - cannot read property 'hasAttribute' of undefined.
<md-list-item ng-repeat="(key, value) in datasource.entities track by $index">
<div class="fd-bottom-padding" flex layout="row" ng-if="value == 0">
<div flex>
<p>Data has not yet been received for processing.</p>
</div>
</div>
<div class="fd-bottom-padding" flex layout="row" ng-if="value != 0">
<div flex="10" layout="column" layout-align="center center">
<ng-md-icon size="38" icon="my_library_books"></ng-md-icon>
</div>
<div flex>
<h3>{{ key }}</h3>
<p>Total records sent: {{ value }}</p>
</div>
<div>
<md-button class="md-button" aria-label="Map To Template">
<md-tooltip md-direction="left">
Map To Template
</md-tooltip>
<ng-md-icon size="24" icon="play_circle_outline">
</ng-md-icon>
</md-button>
</div>
</div>
</md-list-item>
Angular-Material.js Line 7116 is where the problem is happening:
function computeProxies() {
if (!$element.children()[0].hasAttribute('ng-click')) {
angular.forEach(proxiedTypes, function(type) {
angular.forEach($element[0].firstElementChild.querySelectorAll(type), function(child) {
proxies.push(child);
});
});
}
}
I believe it's happening due to the ng-if on the first div inside the md-list-item. Is there another way I should be handling this, or is this a bug?
Metadata
Metadata
Assignees
Labels
No labels