了解 : angular ng-messages

ng-messages="form['positionTitle' + languageVersion.typeEnum].$error

 

ng-messages="form.positionTitle{{languageVersion.typeEnum}}.$error

 

以上2个的表达式只有第1行可以,所以之后ng-messages都这么做。

为什么不全部都follow第1行的?因为读的时候不容易,理解javascript会误会,毕竟是angular 表达式。暂时先用容易读的方式来写

posted @ 2015-10-17 21:38  泉油  阅读(241)  评论(0编辑  收藏  举报
Web Design Johor Bahru Malaysia - Stooges