Hi Sander, I did not view the code, I was in the middle of something at work and just wanted to respond to your question.
I know in angular we shouldnt be doing that we do in jquery as far as re placing the data the way I did there so I have to re-examine my code because I was setting the variable = '' instead of null. Not sure if that makes a different but maybe I set it at the wrong time in the code. Is there a difference between setting to empty string and null as far as anuglar treats the binded variable? On Tuesday, May 13, 2014 11:47:23 AM UTC-4, Sander Elias wrote: > > Billy, > > In Angular you don't replace elements. you are working on the data. In my > example it does reset the time if the date changes. > As that was part of what you asked for, I did add the following line in > the sample: > ```javascript > $scope.appointment.appointment_time = null; //reset time! > ``` > (it's line 35!) > With angular it's really simple, you just set your data to what you want > it to be! I would code it so, that is a time is already selected, > and is also available at the new date, I would reuse that time, otherwise, > rest to the first available time-slot. but that's up to you. > > As the plunker does not have a real backend, I loaded an different json > based on the date. I think you can manage the change > you need for your backend, right? I make 2 different $http calls, you need > to make a single $http call with the date as the parameter! > > Regards > Sander > > > > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
