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.

Can't use either *show* or *hide* words as bindings #10935

@samithaf

Description

@samithaf

Actual Behavior:

  • What is the issue? * Can't use either show or hide words as bindings if i use material 1.1.4 + and throws a runtime error in Angular AST compiler
  • What is the expected behavior? should be able to use any word as bindings and valid angular expressions

CodePen (or steps to reproduce the issue): *

  • CodePen Demo which shows your issue: https://codepen.io/samithaf/pen/eGjOWg
  • Details:See the simple component my-alert. This component has a binding show and passing a valid angular expression. During the compilation time angular throws an error. However if I use any other word like for an example, display as the binding application works fine. Also if I downgrade Material version to 1.1.3 application works fine as well. I am pleased to use the newer version since it has some bug fixes for date picker. But this problem stops me from upgrading.

AngularJS Versions: *

  • AngularJS Version:1.5.5
  • AngularJS Material Version:1.1.5

Additional Information:

  • Browser Type: * All browsers
  • Browser Version: *All versions
  • OS: *
  • Stack Traces:
console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js:1 
Error: [$parse:syntax] 
Syntax Error: Token '&&' not a primary expression at column 17 of the expression 
[$ctrl.pineapple-&&-$ctrl.apple] starting at [&&-$ctrl.apple].

I wonder what are the other keywords Material restricts since this issue kills the application completely. ( Probably Material is reregistering directives in the global scope without any namespaces which is the root cause to the problem )

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions