0

I'm new to angular and have built a simple single page application with routing to other pages. For some reason though I cannot write custom jquery/javascript on my pages. I want to implement simple bootstrap functionality i.e. (pop-up boxes),but I have been unsuccessful. Ive installed bootstrap.js through nuget packager so it works fine just not the js part. When I tried creating a simple index.html page outside of my views directory, everything worked fine however this page breaks out my routing sequence. Any Ideas?

4
  • what errors you receive in your log is important, you should use a controller and when for example your template loaded act for your jquery classic function initiation $scope.$on('$viewContentLoaded', function() { jQueryfunction1.init(); }); I hope this makes sense for you Commented Jun 3, 2016 at 22:54
  • I get a couple warnings about errors regarding the basic html but thats it. As for that second part are you saying I have to incorporate my js functionality within my controller js page? Commented Jun 4, 2016 at 0:09
  • I want to use built in angulary/bootstrap dependencies so it would all have to be on a view. angular-ui.github.io/bootstrap Commented Jun 4, 2016 at 0:12
  • No problem about angular-ui, but this is important when you are using angular views, to manipulate your code correctly use $scope.$on('$viewContentLoaded', function() { jQueryfunction1-2-3.init(); }) Commented Jun 4, 2016 at 15:16

1 Answer 1

1

Take a look at this. Also make sure you are not initializing multiple instances of js/jquery. Is your console showing you any errors?

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.