question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ivy: binding to [style.opacity] with a value of 0 is broken

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/core

Is this a regression?

Yes, it works in non-ivy.

Description

@Component({
  selector: 'app-test',
  template: `
    <label [style.opacity]="opacity">
      This has an opacity binding, and should not be visible
    </label>
  `
})
export class MyComponent {
  opacity = 0;
}

Reproducible repo: https://github.com/fr0/angular-test

🌍 Your Environment

Angular Version:

Angular CLI: 8.1.0-rc.0
Node: 12.4.0
OS: darwin x64
Angular: 8.1.0-rc.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.801.0-rc.0
@angular-devkit/build-angular     0.801.0-rc.0
@angular-devkit/build-optimizer   0.801.0-rc.0
@angular-devkit/build-webpack     0.801.0-rc.0
@angular-devkit/core              8.1.0-rc.0
@angular-devkit/schematics        8.1.0-rc.0
@ngtools/webpack                  8.1.0-rc.0
@schematics/angular               8.1.0-rc.0
@schematics/update                0.801.0-rc.0
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.35.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JoostKcommented, Oct 10, 2019

The 9.0.0-next.10 release is likely to contain a fix for this: #32994. Could you please test again with that version and report back? Thanks!

0reactions
angular-automatic-lock-bot[bot]commented, Nov 14, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

visibility:hidden in Angular 2 - css - Stack Overflow
You can set the visibility style attribute with style binding: ... .com/edit/angular-ivy-6sac33?file=src%2Fapp%2Fhide-element.directive.ts.
Read more >
opacity | CSS-Tricks
When an element has a value of 0 the element is completely invisible; a value of 1 is completely opaque (solid).
Read more >
User Interface - Axon.ivy 7.0 | Designer Guide
Data binding markers are visible when the value of an input element is bound to a data element with an EL expression. You...
Read more >
Groovy reference documentation
With a plain interpolated expression, the value was actually bound at the time of creation of the GString. 6, But with a closure...
Read more >
ivy 6 String IYV IP-350 TBK PRS Solid-Body Electric Guitar ...
The binding is super nice. It is my first experience with a PRS style. I found it comfortable with a nice belly tuck....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found