ng2-order-pipe
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -0,1 +1,13 @@ | ||
### 0.1.4 | ||
[[#11](https://github.com/VadimDez/ng2-order-pipe/issues/11)] - Sort array without expression | ||
```html | ||
<div *ngFor="let i of [3, 2, 1] | orderBy">{{ i }}</div> | ||
``` | ||
Result: | ||
```html | ||
<div>1</div> | ||
<div>2</div> | ||
<div>3</div> | ||
``` | ||
### 0.1.3 | ||
@@ -2,0 +14,0 @@ Angular 4 |
@@ -17,2 +17,5 @@ "use strict"; | ||
var array = value.sort(function (a, b) { | ||
if (!expression) { | ||
return a > b ? 1 : -1; | ||
} | ||
return a[expression] > b[expression] ? 1 : -1; | ||
@@ -19,0 +22,0 @@ }); |
{ | ||
"name": "ng2-order-pipe", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Angular2 order pipe, order collection by a field", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10643
78