What you are doing with jquery in a global $(document).ready() is not 
really the angular way of doing things.

The angular way of doing things is to annotate the html and then write a 
directive to apply the javascript to that annotation.

For example, you could have:

  <input my-date-range ng-model="data.RangeStart" />

Then in order to apply the jquery datepicker, you would create your own 
custom directive:

app.directive("myDateRange", function(){
   return {
       link: function(scope, element, attrs){
            element.datepicker({
               format: 'mm-dd-yyyy'
            });   
      }

    };
}

This will now make every input that has the my-date-range attribute be a 
date-picker. Just keep in mind, this is a simplified example and you should 
look more into how to write your own directives, as this is essential to 
doing things the right way in angular. 


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to