Boris Cherny b33fe4e277 🌅
2017-02-24 18:27:43 -08:00
🌅
2017-02-24 18:27:43 -08:00
🌅
2017-02-24 18:27:43 -08:00
🌅
2017-02-24 18:27:43 -08:00
🌅
2017-02-24 18:27:43 -08:00
🌅
2017-02-24 18:27:43 -08:00
🌅
2017-02-24 18:27:43 -08:00
🌅
2017-02-24 18:27:43 -08:00
🌅
2017-02-24 18:27:43 -08:00

angularize Build Status NPM MIT

Description

Installation

npm install angularize --save

Usage

1. Create your React component

interface Props {
  fooBar: number
  baz: string
}

class MyComponent extends React.Component<Props, void> {
  render() {
    return <div>
      <p>Foo: {this.props.fooBar}</p>
      <p>Bar: {this.props.bar}</p>
    </div>
  }
}

2. Expose it to Angular

import { angularize } from 'angularize'

angular
  .module('myModule', [])
  .component('myComponent', angularize(MyComponent, ['foo', 'bar']))

3. Use it in your Angular 1 template

<my-component
  foo-bar="3"
  baz="'foo'"
></my-component>

Tests

npm test

License

Apache2

S
Description
The easiest way to embed React components in Angular 1 apps.
Readme 2.2 MiB
Languages
TypeScript 95.3%
JavaScript 4.7%