X Tutup
Skip to content

alpha.39: classes added to the original element removed by host class property #4583

@adamdbradley

Description

@adamdbradley

In the below code, the yellow css class added to the original element is being removed by the directive's host: { 'class': 'item' } property.

@Directive({
  selector: 'my-item',
  host: {
    'class': 'item'
  }
})
export class MyItem {}


@Component({
  selector: 'my-app'
})
@View({
  template: `
  <my-item class="yellow">
    My Item
  </my-item>
  `,
  directives: [MyItem]
})
export class App {}

alpha.39 does remove the "yellow" css class from the element:
http://plnkr.co/edit/uWtEnSvK7GMSj3i3MCeG?p=preview

alpha.37 does not remove the "yellow" css class from the element:
http://plnkr.co/edit/ug3KaOTAjYOECLeLW0mQ?p=preview

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    X Tutup