Skip to content

Commit 92288d0

Browse files
authored
Create README.md
1 parent 6c5e399 commit 92288d0

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,9 +1046,22 @@ app.filter("过滤器名字",function("服务")){
10461046
```
10471047
[Angular自定义关键词检索过滤器](https://wscats.github.io/angular-tutorial/%E8%87%AA%E5%AE%9A%E4%B9%89%E5%85%B3%E9%94%AE%E8%AF%8D%E6%A3%80%E7%B4%A2%E8%BF%87%E6%BB%A4%E5%99%A8(%E7%AE%80%E7%89%88).html)
10481048
1049+
## 表单验证
1050+
1051+
|value|value|
1052+
|-|-|
1053+
|$dirty|表单有填写记录|
1054+
|$valid|字段内容合法的|
1055+
|$invalid|字段内容是非法的|
1056+
|$pristine|表单没有填写记录|
1057+
|$error.required|值是必须的|
1058+
1059+
[参考Angular表单验证DEMO](https://wscats.github.io/angular-tutorial/angular%E8%A1%A8%E5%8D%95%E9%AA%8C%E8%AF%81.html)
1060+
10491061
## 路由
10501062
1051-
**UI路由**
1063+
### UI路由
1064+
10521065
### 引入JS文件
10531066
开始引入angular和ui-route的js文件
10541067
```javascript
@@ -1139,6 +1152,7 @@ app.controller('pageMain2Ctrl', function($scope, $state) {
11391152
11401153
### 页面之间通信数据
11411154
### 路由之间通信数据
1155+
11421156
>不同页面之前的控制器之间通信数据
11431157
11441158
在url上传递和接受(拼接参数到url上,然后用$loacion.search()接受)
@@ -1195,7 +1209,8 @@ app.controller("page2Ctrl",function($state){
11951209
}
11961210
})
11971211
```
1198-
**ng路由**
1212+
### ng路由
1213+
11991214
1.下载ng路由文件
12001215
12011216
引入angular-route.js到项目中,放在angular.js之后,然后在代码里面引入`ngRoute`模块

0 commit comments

Comments
 (0)