jeudi 7 juillet 2016

Loading JSX file from content server asp.net

I am facing a issue when I am trying to get my JSX file by a content server. When I run it locally it work fine.

<script type="text/javascript" src="~/Script/Test.jsx")> </script>

But when I try to run from content server (which in this case is localhost:8111) it did not work

<script type="text/javascript" src="http://localhost:8111/Test.jsx")> </script>

I tried to find the problem and seem like some scope issue not sure what can do to fix it.Someone suggested to use window instead of var like

var TestDataTile = React.createClass({

replace with

window.TestDataTile = React.createClass({

But that to is not working. I am using react-0.14.0.js,react-dom-0.14.0.js

Can anyone guide me towards correct direction?

Aucun commentaire:

Enregistrer un commentaire