Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have to use Angular UI Bootstrap for the datepicker directives, as well as Semantic UI for the modals. In order to resolve the conflict between Bootstrap and Semantic UI modals, I have to include this in the partials.html.

<script>
$.fn.bsModal = $.fn.modal.noConflict();
</script>

This works great when I load the page the first time. However when I navigate away from the page and come back, I get an error message in the console, and my scope objects get mucked up....all the {{{someobject.key}} code shows up:

TypeError: $.fn.modal.noConflict is not a function

I have to refresh the page to resolve the problem.

Is there a way to put this in the controller rather than the body of the partials? I tried putting the line in my controller but it didn't work. Same error.

share|improve this question
1  
can you provide jsfiddle or plunker? –  Grundy 2 days ago
    
embed.plnkr.co/J34kPph06ezZhLyai4Ci/index.html Sorry if it's a mess....just cut and pasted chunks from my project here. annotated some parts to explain. –  Ben Looi 2 days ago

1 Answer 1

OK, not the best of coding, but a simple solution nonetheless.

I commented out the modal section in the bootstrap JS file by adding /* at the line where it starts.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.