I was able to solve it by Lazy loading the scripts.
The problem is that i had many javascript/jquery libraries i had to load 
after the angular.
My solution was adding a directive by assigning a new attribute type 
"text/javascript-lazy" to all libraries i want to lazy load them.
For anyone who has the same problem, follow this link: 
https://gist.github.com/endorama/7369006
Thanks,

On Sunday, March 8, 2015 at 9:50:55 AM UTC+2, basil farraj wrote:
>
> I use angular-ui-router in my website and i load the views using the 
> ui-view directive.
> I also use some JQUERY scripts to manipulate the html DOM in the app views 
> . The problem is that the JQUERY scripts fail if i insert them into my 
> index.html page (after and before the ui-view directive). I am assuming 
> that this has to do with the scripts order, or maybe it takes some time for 
> the angular app to finish loading the template into the ui-view directive, 
> and jumps too early to the jquery scripts, which causes errors. (such as: 
> trying to use elements that does not exist yet in the dom)
>
>
> Is there any way i can solve this?
> Thank you,
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to