Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Can't set css props while using {{}}-expression within style-attribute #12763

Closed
@dhilt

Description

@dhilt

Greetings! I've made a little repro: http://jsfiddle.net/dhilt/8tceyw2w/3/ on Angular 1.4.4.

My problem is that I can't set css property via .css() while I'm playing with visibility of the element like this:

<div class="myElement" style="visibility:{{visible ? 'visible' : 'hidden' }}">

And there is no problem when I switch to classes-playing:

<div class="myElement" class="myElement {{visible ? 'visible' : 'hidden'}}">
.visible { visibility: visible; }
.hidden { visibility: hidden; }

So we have two similar situations with two different behaviour. In the demo (http://jsfiddle.net/dhilt/8tceyw2w/3/) I try to set some property syncronous for both cases right after the visibility is switched, and my expectation is that the values of this property of both elements must be the same. And they are not the same.

Please advise!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions