发表于: 2017-07-30 23:51:49
2 770
任务进展:
1、写搜索功能,未果;
2、晚上看了一会儿高程,没看出什么所以然
遇到问题:
1、昨天apizza测试接口可以进行模糊请求,在URL手动添加参数请求就出不来了,但是换成别的参数,比如size又可以,并不是请求参数类型的问题,是UI-router的config没有写上请求字段所致;
.state("sidebar.Page1", {
url:"/Page1?page&?size?title?type",//ui-router的config这里需要添加上请求参数的字段
templateUrl: "views/Page1.html",
resolve:{
loadMyFile:lazy([
"js/Page1.js"
])
}
})
2、写的ng-show,好像ng-message也可以用,但不明白为什么要用ng-message,一会儿看看
<p>邮箱:<br>
<input type="email" name="email" ng-model="email" required>
<span style="color:red" ng-show="myForm.email.$dirty && myForm.email.$invalid">
<span ng-show="myForm.email.$error.required">邮箱是必须的。</span>
<span ng-show="myForm.email.$error.email">请输入正确的邮箱。</span>
</span>
</p>
3、用angular ui-router 时候遇到一个问题,在chrome中URL栏中显示的是乱码,好像有什么方法可以使其不乱码,昨晚没看明白,一会儿再看看;
明天计划:
1、继续写代码;
2、分点时间回头看高程~
收获心得:
1、http://www.ncloud.hk/技术分享/ui-router-transmit-params/关于ui-router传递参数的有关说明
评论