相关疑难解决方法(0)

Angular 2数据属性

我觉得我错过了什么.当我尝试data attribute在我的中使用时template,像这样:

<ol class="viewer-nav">
    <li *ngFor="#section of sections" data-value="{{ section.value }}">
        {{ section.text }}
    </li>
</ol>
Run Code Online (Sandbox Code Playgroud)

Angular 2 崩溃:

EXCEPTION:模板解析错误:无法绑定到"sectionvalue",因为它不是已知的本机属性("

] data-sectionvalue ="{{section.value}}"> {{section.text}}

我显然遗漏了一些语法,请帮忙.

angular2-template angular

197
推荐指数
2
解决办法
10万
查看次数

标签 统计

angular ×1

angular2-template ×1