0

I am working on Angular JS project. I am trying to make reactjs components and trying to render them inside angular view. But it is not working.

E.g.

If I write below code inside the angular template. Nothing happens.

<div id="app"></div>

But if I write it outside the angular template. It works.

Why so? And how can I get it working in AngularJS view?

1 Answer 1

0

You have to use a bridge of reactjs to angularjs. i suppose you can use ngReact.

In fact when you do calls to js which modifies the DOM, you have to set this code in an angularjs directive in order to execute the js once the view is loaded.

There are lots of bridges to angularjs, in which the directives are defined.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.