I have to add some angular components to angular project and I found this package. I did the following steps:
npm install react2angular react react-dom prop-types --saveinto the angular projectAdd a directory (in the root project) named src and inside it one index.js with the following code:
import { react2angular } from "react2angular"; import React from "react"; function Example() { return <button type="button">Click me</button>; } angular .module("myModule") .component("example", react2angular(Example, ["apiUrl", "token"]));after this I moved in the angular code and I added
<example api-url="123" token="456"/>
Nothing happens. No button appears.
This seems to be made based on the official documentation. Did I do something wrong? Keep in mind that I have no experience with angular, this is why I want to work with react.
myModuleis not registered.