src/app/heroes/heroes.component.html(HeroesComponent'stemplate)
content_copy selectedHero.name|uppercase}}Details ngModelcontent_copy<input[(ngModel)]="favoriteHero"/>在Angular中,双向绑定使用[()]标记出来,它被形象的比作“盒子中的香蕉”。 h2>{{hero.name|uppercase}}Details 比如,你只有导入了Angular的FormsModule时才能使用[(ngModel)]。exports可供导入了自己的模块使用的可声明对象(组件、指令、管道类)的列表。显示英雄列表
AngularJS 与 Angular 的概念对照
主从组件
NgModule API

扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2026 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059
粤公网安备44030502008569号
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号
