Skip to content

Commit

Permalink
this.injectedProps must be an object
Browse files Browse the repository at this point in the history
  • Loading branch information
fand committed Nov 2, 2017
1 parent acfeede commit d5cd8de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ export function react2angular<Props>(
return {
bindings: fromPairs(names.map(_ => [_, '<'])),
controller: ['$element', ...injectNames, class extends NgComponent<Props> {
injectedProps: any[];
injectedProps: { [name: string]: any }
constructor(private $element: IAugmentedJQuery, ...injectedProps: any[]) {
super()
this.injectedProps = injectedProps;
this.injectedProps = {}
injectNames.forEach((name, i) => {
this.injectedProps[name] = injectedProps[i]
})
}
render() {
// TODO: rm any when https://github.com/Microsoft/TypeScript/pull/13288 is merged
Expand Down

0 comments on commit d5cd8de

Please sign in to comment.