angular-docs-cn/public/docs/js/latest/api/di/bind-function.jade

24 lines
502 B
Plaintext
Raw Normal View History

2015-04-19 13:53:18 -07:00
.l-main-section
h2(class="function export") bind
p <code>(token)</code>
2015-04-22 08:06:51 -07:00
p.location-badge.
2015-04-23 08:27:36 -07:00
exported from <a href="/angular2/di.html">angular2/di</a>
2015-04-19 13:53:18 -07:00
:markdown
2015-04-23 08:27:36 -07:00
Provides an API for imperatively constructing <a href="Binding-class.html"><code>Binding</code></a>s.
2015-04-20 13:57:43 -07:00
2015-04-23 08:27:36 -07:00
This is only relevant for JavaScript. See <a href="BindingBuilder-class.html"><code>BindingBuilder</code></a>.
2015-04-20 13:57:43 -07:00
## Example
```javascript
bind(MyInterface).toClass(MyClass)
```
2015-04-19 13:53:18 -07:00