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 angularJs application, I also use Angular routing to go browse through other pages.

When I try to use some jQuery validation libraries for IE8 compatibility (for new html5 atrributes) it does not work at all and I guess this is because I dont use jQuery properly.

The the below code is from body of index.html

<body>
....

<script src="js/libs/jquery.h5validate.js"></script>

<script type="text/javascript">

  $(document).ready(function (){

      $('#Page').h5Validate();
});

</script>


</body>

Here "ProfilePage" form element is on another html file(consists from a div) and I can not access/use it like above using jQuery. It just does not do anything.

Any solutions?

share|improve this question
    
Are you including the full jQuery, or the mini jQuery that comes with Angular? –  RGraham Feb 14 at 16:26
    
@RGraham full version –  Spring Feb 14 at 16:27
1  
If ProfilePage is on an external file loaded by a route, you should call that h5Validate from that controller –  RGraham Feb 14 at 16:28
    
@ RGraham and how can I do this without creating a directive? yes bad practise..but time is short :0 –  Spring Feb 14 at 16:29
2  
Create the directive. Probably quicker than working out how not to do it with a directive. –  net.uk.sweet Feb 14 at 16:31

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.