goKatu goKatu - 1 year ago 82
Javascript Question

angular2 binding applies only after mouse movement

I'm a new angular2 development and currently facing a rendering issue with my application. I use @angular@2.0.0-rc.1 for my app and router-deprecated@2.0.0-rc1 for my routing, whenever I click on the a link, the static content of the page loads immediately and the binding (dynamic content) happens only when I do some interaction with the mouse like click or hover over a link. I tried various options and still couldn't figure it out.

Any help would be appreciated.

Answer Source

The order in which you include the JS files is important. This issue happened when I didn't.

<script src="/lib/shim.min.js"></script>
<script src="/lib/system.js"></script>
<script src="/lib/system-polyfills.js"></script>
<script src="/lib/Reflect.js"></script>
<script src="/lib/zone.js"></script>