Last active
August 26, 2016 14:39
-
-
Save vicatcu/2ef2c7ba1e006d70997c0577f9395206 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="menu"> | |
<div class="item" *ngFor="#unt of unitOpts" (click)="changeUnits(unt)"> | |
<div [innerHTML]="unt.formatted" data-tooltip="{{unt.tooltip}}" data-position="right center"></div> | |
</div> | |
</div> | |
produces... | |
browser_adapter.ts:74 EXCEPTION: Error: Uncaught (in promise): Template parse errors: | |
Can't bind to 'tooltip' since it isn't a known native property ("pts" (click)="changeUnits(unt)"> | |
<div [innerHTML]="unt.formatted" [ERROR ->]data-tooltip="{{unt.tooltip}}" data-position="right center"></div> | |
"): ChartComponent@25:67 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="item" *ngFor="#unt of unitOpts" (click)="changeUnits(unt)"> | |
<div [innerHTML]="unt.formatted" data-tooltip="" data-position="right center"></div> | |
{{unt.tooltip}} | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="menu"> | |
<div class="item" *ngFor="#unt of unitOpts" (click)="changeUnits(unt)"> | |
<div [innerHTML]="unt.formatted" [attr.data-tooltip]="unt.tooltip" data-position="right center"></div> | |
</div> | |
</div> | |
ref: https://angular.io/docs/ts/latest/guide/template-syntax.html#!#attribute-binding | |
note: this breaks if you chant `#unt` to `let unt` | |
Note: This is in 2.0.0-beta.15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment