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.

ngClass applies only changed classes, while erasing non-changed classes #7135

Closed
@tomaszkrym

Description

@tomaszkrym

Let's have (http://plnkr.co/edit/vTOSSE ):

data-ng-class="{'clicked my-btn': ui.clicked === true, 'not-clicked my-btn': ui.clicked !== true}"

When the element is rendered at first, it has the classes applied correctly. But after change of the state (condition), the classes from former state are removed (Here 'not-clicked my-btn', but only new classes (here 'clicked') are applied to the element. The 'my-btn' class is lost.

This issue appeared after upgrade from 1.2.15 to 1.2.16.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions