Skip to content

The interpolation not working in style attribute #8536

@Tsabci

Description

@Tsabci

Problem:
The interpolation not working in style attribute

import {Component} from '@angular/core'

@Component({
  selector: 'my-app',
  providers: [],
  template: `
    <div>
      <h3 style='color:red;'>Hello {{name}}</h3>
      <h3 style='color:blue;'>Hello {{name}}</h3>

      <h3 style='color:{{newColor}};'>In this row not working the style, but other interpolation do -> {{name}}</h3>

    </div>
  `,
  directives: []
})
export class App {
  newColor: string = 'blue';
  name: string = 'Angular2 (Release Candidate!)'; 

  constructor() {
    this.name = 'Miki Maki';
  }
}

in this row the stye attribute not working

this was correct before RC0

plunker sample

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