30 lines
711 B
Plaintext
30 lines
711 B
Plaintext
|
|
.l-main-section
|
|
h2(class="function export") bind
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
bind(token: any) : BindingBuilder
|
|
|
|
|
|
p.location-badge.
|
|
exported from <a href='../di'>angular2/di</a>
|
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.32/modules/angular2/src/di/binding.ts#L243-L259">angular2/src/di/binding.ts (line 243)</a>
|
|
|
|
:markdown
|
|
Provides an API for imperatively constructing <a href='Binding-class.html'><code>Binding</code></a>s.
|
|
|
|
This is only relevant for JavaScript. See <a href='BindingBuilder-class.html'><code>BindingBuilder</code></a>.
|
|
|
|
## Example
|
|
|
|
```javascript
|
|
bind(MyInterface).toClass(MyClass)
|
|
|
|
```
|
|
|
|
|
|
|
|
|