Skip to content

ngClass not setting from Component Method #7426

@nigeman

Description

@nigeman

Maybe I am doing this wrong so someone correct me if I have and I will remove this ticket- But...
Referring to this documentation here regarding setting classes from a component method.

https://angular.io/docs/ts/latest/guide/template-syntax.html#!#ngClass

Plunker here:
http://plnkr.co/edit/1lvH5zHZIHIQS4hmNOoW?p=preview

In the Plunker I have two headers. One that uses the regular inline way (second header) and the first header is using the way mentioned in the template syntax documentation.

Expect:
Both headings to be red with the class "red".

Result:
Only one heading has the class "red".

This happens on A2 2.0.0-beta.8 and seems to be on beta.7 aswell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: commonIssues related to APIs in the @angular/common packagetype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions