角度 – 离子2和ng-模型
发布时间:2020-12-17 10:19:42 所属栏目:安全 来源:网络整理
导读:我真的觉得它是一个早期采用者,因为谷歌无法找到解决我的问题的方法:) 我以某种方式得到这个错误: Can’t bind to ‘ng-model’ since it isn’t a known native property 我没有在Ionic中看到@Component,所以页面配置如下: import {Page,NavController} f
我真的觉得它是一个早期采用者,因为谷歌无法找到解决我的问题的方法:)
我以某种方式得到这个错误:
我没有在Ionic中看到@Component,所以页面配置如下: import {Page,NavController} from 'ionic-framework/ionic'; @Page({ templateUrl: 'app/home/home.html',directives: [Select] }) 我的模板是这样的: <ion-input floating-label> <ion-label>Search text...</ion-label> <input type="text" [(ng-model)]="searchInput" /> </ion-input> 我正在使用Ionic 2. 干杯
在Angular 2中,您应该在模板中使用
ngModel ,而不是ng-model.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
- 模式匹配Scala中列表的结尾/中间
- twitter-bootstrap – Bootstrap 4,如何使col高度
- angularjs – ng选项与对象数据源
- 几种流行Webservice框架性能对比(转载、拼接)
- AngularJS 实现当元素为ng-disabled改变背景颜色
- rocketmq中的NettyRemotingClient类的简单分析
- angularjs – TextAngular fileDropHandler文档
- Bootstrap Multiselect 动态二联赋值 支持多选
- docker 搭建hadoop以及hbase集群详解
- bash – 以编程方式检测已安装的Common Lisp实现
热点阅读