Skip to content

Commit

Permalink
Merge 90b45b2 into fab7913
Browse files Browse the repository at this point in the history
  • Loading branch information
sveint committed Jun 22, 2017
2 parents fab7913 + 90b45b2 commit 6adcd16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/api/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,15 @@ angular.component('myComponent', {
controller: connect({
foo: state`foo`,
click: signal`clicked`
}, 'myComponent', function MyController () {
}, 'MyComponent', ['cerebral', function MyController (cerebral) {

// In some cases you might need access to cerebral's controller.
// You can inject the cerebral angular service and
// access it's controller property anywhere in your app
cerebral.controller.getSignal('mySignal')()

// Optionally add custom behaviour to controller
})
}])
})
```
Since angular doesn't expose the component name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export default angular => {
displayName
)
},
controller,
}
},
]
Expand Down

0 comments on commit 6adcd16

Please sign in to comment.