# angular-cherry-pick

> Angularjs filter - Cherry picking a element from the array

Latest version **0.0.1** (published 2016-12-09) · BSD-3-Clause license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install angular-cherry-pick
pnpm add angular-cherry-pick
yarn add angular-cherry-pick
bun add angular-cherry-pick
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-12-09 |
| First published | 2016-12-09 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | sengokyu |
| Maintainers | sengokyu |
| Keywords | angular, browser, client-side, framework |

## Links

- npm: https://www.npmjs.com/package/angular-cherry-pick
- Repository: https://github.com/sengokyu/angular-cherry-pick
- Homepage: https://github.com/sengokyu/angular-cherry-pick#readme
- Issues: https://github.com/sengokyu/angular-cherry-pick/issues
- npm.io page: https://npm.io/package/angular-cherry-pick

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2016-12-09

## README

# What is this?

This is nearly equivalent as follows.

```
<ANY ng-repeat="option in options|filter:{id:selectedId}:true">{{option.title}}</ANY>
```


# Use case


In a controller, some array defined.


```
$scope.options = [
  {id:1, title:'foo'},
  {id:2, title:'bar'},
  {id:3, tille:'baz'}
]
```

In a template, a drop-down list uses the defined array.


```
<select ng-options="option.id as option.title for option in options"
  ng-model="selectedId"></select>
```


And, render a element as `title' property not `id' property.


```
{{options|cherrypick:{id:selectedId}:'title'}}
```

# Usage

Add the module to your application.

```js:
angular.module('myApp', ['ngCherryPick']);
```

Add the filter to a binding.

```html:
{{mylist|cherrypick:{id:100}:properyName}}
```


# Why does not bind a object, but a id.

Because the world is complex...


Of course, You can goes on a simple way.

```
<select ng-options="option as option.title for option in options"
  ng-model="selected"></select>

{{selected.title}}
```

---
_Source: https://npm.io/package/angular-cherry-pick · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
