https://github.com/alansferreira/nglinq
Linq-js module service for angular-js
https://github.com/alansferreira/nglinq
angular bower factory html integration javascript js linq linqjs node service
Last synced: 2 months ago
JSON representation
Linq-js module service for angular-js
- Host: GitHub
- URL: https://github.com/alansferreira/nglinq
- Owner: alansferreira
- License: mit
- Created: 2017-08-29T19:59:56.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-28T22:14:30.000Z (over 8 years ago)
- Last Synced: 2026-01-23T09:10:28.552Z (5 months ago)
- Topics: angular, bower, factory, html, integration, javascript, js, linq, linqjs, node, service
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ngLinq
## Installations
**NodeJs**
```
npm i ng-linq
```
**Bower**
```
bower i ng-linq
```
**Html**
```html
```
## Use
```html
<script src='bower_components/angular/angular.min.js'>
<script src='bower_components/linqjs/linq.min.js'>
<script src='bower_components/angular-linq/dist/ng-linq.min.js'>
<script>
angular('myApp', ['ngLinq'])
.controller('ctrl1', function($scope, $from){
$scope.data = [
{id: 2, text: 'item 2'},
{id: 1, text: 'item 1'},
{id: 3, text: 'item 3'},
];
var sortedByName = $from($scope.data).orderBy('$.text').toArray();
var allIds = $from($scope.data).select('$.id').toArray();
var allTexts = $from($scope.data).select('$.text').toArray();
//controller stuffs...
});
```
## Depencencies
> https://github.com/mihaifm/linq for bower
> https://github.com/joaom182/linqjs for npm