【发布时间】:2014-01-21 08:48:53
【问题描述】:
我无法访问该组件构造函数中的属性 val
@NgComponent(
selector: 'dartcomp',
templateUrl: 'dartComp.html',
publishAs: 'ctrl',
map: const
{
'val' : '@val'
}
)
class DartComp
{ String val;
DartComp()
{ print("construktor DartComp $val");
}
}
在 index.html 中使用过
<dartcomp id="dc" val="x"></dartcomp>
有没有办法在构造函数中访问 val?
【问题讨论】:
标签: dart angular-dart