Angularjs ng在v1.3.0-beta.13版之后,通过不为我工作的方式重复订单

Angularjs ng在v1.3.0-beta.13版之后,通过不为我工作的方式重复订单,angularjs,Angularjs,是否有人注意到在该配置中使用ng repeat时出现的问题: <div ng-repeat="row in home.grid.view = (home.grid.data | orderBy:ctrl.contentOrderBy[ctrl.configService.admin.contentOrderBy].key:ctrl.configService.admin.contentSortDirection)"> ctrl.configService.admin.content

是否有人注意到在该配置中使用ng repeat时出现的问题:

<div ng-repeat="row in home.grid.view = (home.grid.data | orderBy:ctrl.contentOrderBy[ctrl.configService.admin.contentOrderBy].key:ctrl.configService.admin.contentSortDirection)">
ctrl.configService.admin.contentSortDirection有两个值:0或1

我的问题是,当我尝试更改为configService.admin.contentSortDirection时:

  • @许可证AngularJS v1.3.0-beta.8-有效
  • AngularJS v1.3.0-beta.12版-有效
  • AngularJS v1.3.0-beta.13版-有效
  • AngularJS v1.3.0-beta.14-不改变方向
  • @许可证AngularJS v1.3.0-rc.5-不改变方向
  • @许可证AngularJS v1.3.0-不改变方向
我已经检查了最新的文档,除非有误,否则我找不到任何关于如何执行我认为以前文档中经常出现的订单的信息

如果其他人知道这样做的工作方式,我将感谢任何建议。我还想知道为什么ng repeat文档似乎有点缺乏

更改行:

<div ng-repeat="row in home.grid.view = (home.grid.data | orderBy:ctrl.contentOrderBy[ctrl.configService.admin.contentOrderBy].key:ctrl.configService.admin.contentSortDirection)">
不需要输入“reverse=”

您的问题是由Beta 14版本中的此更改引起的:

fix(core): drop the toBoolean function
So far Angular have used the toBoolean function to decide if the parsed value
is truthy. The function made more values falsy than regular JavaScript would,
e.g. strings 'f' and 'no' were both treated as falsy. This creates suble bugs
when backend sends a non-empty string with one of these values and something
suddenly hides in the application

Thanks to lgalfaso for test ideas.

BREAKING CHANGE: values 'f', '0', 'false', 'no', 'n', '[]' are no longer
treated as falsy. Only JavaScript falsy values are now treated as falsy by the
expression parser; there are six of them: false, null, undefined, NaN, 0 and "".

Closes #3969
Closes #4277
Closes #7960

你看到了吗?是的,我看到了,我找不到任何东西可以解释为什么在1000多个测试中只有这个功能在beta 13测试后停止工作。
<div ng-repeat="row in home.grid.view = (home.grid.data | orderBy:ctrl.contentOrderBy[ctrl.configService.admin.contentOrderBy].key:ctrl.configService.admin.contentSortDirection == 1)">
reverse=order.dir === 1
fix(core): drop the toBoolean function
So far Angular have used the toBoolean function to decide if the parsed value
is truthy. The function made more values falsy than regular JavaScript would,
e.g. strings 'f' and 'no' were both treated as falsy. This creates suble bugs
when backend sends a non-empty string with one of these values and something
suddenly hides in the application

Thanks to lgalfaso for test ideas.

BREAKING CHANGE: values 'f', '0', 'false', 'no', 'n', '[]' are no longer
treated as falsy. Only JavaScript falsy values are now treated as falsy by the
expression parser; there are six of them: false, null, undefined, NaN, 0 and "".

Closes #3969
Closes #4277
Closes #7960