Skip to content
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.

ngShow and ngHide on directives that use comment placeholders will error #9243

@jelbourn

Description

@jelbourn

To reproduce:
Click the "Toggle" button
http://codepen.io/jelbourn/pen/mEzrOP?editors=1010#0

The problem:
Angular sometimes uses comment elements as placeholders so that a real element doesn't have to be rendered. This means the element given to a link function will be of type Comment.

Material's decorating of ngShow and ngHide uses getComputedStyle on the element, which fails because it is a comment.

cc @topherfangio as the last one to touch these lines

Metadata

Metadata

Assignees

Labels

P0: criticalCritical issues that must be addressed immediately.g3: reportedThe issue was reported by an internal or external product team.has: Pull RequestA PR has been created to address this issuetype: bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions