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.

Reply via email to