diff --git a/README.md b/README.md index ed9f13d..9a3c1ae 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,37 @@ If `propTypes` are defined and you passed in a 2nd argument, the argument will o > ``` +## Dependency Injection + +It's easy to pass services/constants/etc. to your React component: just pass them in as the 3rd argument, and they will be available in your component's Props. For example: + +```js +import { Component } from 'react' +import { react2angular } from 'react2angular' + +class MyComponent extends Component { + state = { + data: '' + } + componentDidMount() { + this.props.$http.get('/path').then(res => + this.setState({ data: res.data }) + ) + } + render() { + return