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?
-
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 youEbrahim– Ebrahim2016-06-03 22:54:21 +00:00Commented 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?woods– woods2016-06-04 00:09:38 +00:00Commented 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/bootstrapwoods– woods2016-06-04 00:12:05 +00:00Commented 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(); })Ebrahim– Ebrahim2016-06-04 15:16:10 +00:00Commented Jun 4, 2016 at 15:16
Add a comment
|
1 Answer
Take a look at this. Also make sure you are not initializing multiple instances of js/jquery. Is your console showing you any errors?