J
J
jack3d2015-07-27 17:37:08
JavaScript
jack3d, 2015-07-27 17:37:08

How to force script to be executed on page load using angularjs ui-router?

There are charts on the page that do not work if the page is not fully loaded:

document.onreadystatechange = function () {
  if (document.readyState == "complete") {
//Находим элемент по id и что-то с ним делаем.
}};

When loading normally, everything is OK, but if you use ui-roter, the page does not reload and this code does not work. Can you tell me how to make js select elements without reloading using ui-router?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Renat Naysrov, 2015-07-27
@k0sh

Use directives.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question