美文网首页
@Attribute in Angular

@Attribute in Angular

作者: forks1990 | 来源:发表于2018-09-25 16:50 被阅读0次

    In Angular document it says: @Attribute is Attribute decorator and metadata, nothing useful.

    @Attribute is @Input without binding

    For @Input fields, angular runtime creates a binding, component get the updated value, and auto update.

    @Attribute don't create the binding, value copied into component on first time, and that's all. Use @Attribute has a better performance, if the value is static.

    相关文章

      网友评论

          本文标题:@Attribute in Angular

          本文链接:https://www.haomeiwen.com/subject/jwuloftx.html