F*D说: "Be aware that the attribute values to match against cannot be expressions. They are interpreted as literal string values to match against. For example, ng-switch-when="someVal" will match against the string "someVal" not against the value of the expression $scope.someVal." 所以你的情况 ng-switch on="f(selection)", 可以通过function来实现. $scope.f = function(s){ //if 1..9 return "home"; }
【在 i**i 的大作中提到】 : F*D说: : "Be aware that the attribute values to match against cannot be expressions. : They are interpreted as literal string values to match against. For example, : ng-switch-when="someVal" will match against the string "someVal" not : against the value of the expression $scope.someVal." : 所以你的情况 ng-switch on="f(selection)", 可以通过function来实现. : $scope.f = function(s){ : //if 1..9 : return "home"; : }
N*m
34 楼
包子?呵呵
【在 n*****t 的大作中提到】 : 好吧,写在 controller 里总好过一堆恶心的 ngShow AND OR,谢谢楼上二位
if the jquery plugin is awesome, why bother to re-implement it in Angular directive? Don't you know jquery plugin can do whatever you want and desire?
l*n
51 楼
if you want a grid, there is backgrid, why bother to create a grid using angular directive? what you only need provide is some json or restful service, then the backgrid will take care of everything for you, including pagination, editing, sorting.
l*n
52 楼
there is bootstrap components which are but jquery plugins, and are awesome. why not just use them?
l*n
53 楼
for more advanced graphing, you would choose d3, which is completely independent of angular directive. 熟悉这些个库比学什么MVC更重要啊。
l*n
54 楼
two way binding is nothing but some handlebar template helpers.