0

Initially when the page load all ui-view loaded and works fine But when i change the state ui-view not getting javascript file that loaded earlier in it's parent page.Although ui view gets the css file but not js file.

In the index.html all three ui-view viewA,viewB,viewC and navbar.html is template of ui-viewA. enter image description here

Here is the state configuration. When i go to studentDashboard the navbar.html loaded but it's js function that define in vendor/all.js doesn't working. enter image description here

Here is the navbar html and controller enter image description here

10
  • are you looking fro nested router? Commented Jun 25, 2016 at 6:05
  • correct your body tag it has extra > Commented Jun 25, 2016 at 6:05
  • share a screenshot of your navbar and your navbarController code.. Commented Jun 25, 2016 at 6:05
  • Make sure navbarCtrl in navbarController has the correct spelling Commented Jun 25, 2016 at 6:06
  • @MuthukannanKanniappan i have attached the screenshot. Commented Jun 25, 2016 at 6:09

1 Answer 1

0

You can work around it by converting the js file into a method and render the function inside the ui-view html containing the child page. this approach will work but the downside is when working with directive to inject the sidebar content dynamically. it will require you to duplicate a separate css of same type for each roles and likewise the js too.

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.