Thanks Sander, it worked!
The parameters I was passing were wrong:
Array.prototype.splice.apply($scope.timeSlots, [0, 0].concat(earlier));



On Thursday, October 16, 2014 2:05:06 PM UTC-3, Joberto Diniz wrote:
>
> It is not that. The following line is modifying the *$scope.timeSlots* 
> array:
> Array.prototype.splice.apply($scope.timeSlots, [0, 2].concat(earlier));
>
>
>
> On Thursday, October 16, 2014 2:03:12 PM UTC-3, Sean Amoroso wrote:
>>
>> Man I could've used used Sander's response on Monday!  Fun week.  Looking 
>> at your plunkr you need to modify the $scope.timeSlots array, you're just 
>> modifying the earlier array object which doesn't relate to $scope.timeSlots.
>>
>> Something like this:
>>
>> $scope.timeSlots.push(new 
>> itaas.TimeSlot(now.clone().subtract(2,'hours'),now.clone().subtract(1,'hours')));
>> $scope.timeSlots.push(new 
>> itaas.TimeSlot(now.clone().subtract(1,'hours'),now.clone()));
>>
>> On Thursday, October 16, 2014 12:41:44 PM UTC-4, Joberto Diniz wrote:
>>>
>>> Thanks, but it didn't work.
>>> I've created a plunker: 
>>> http://plnkr.co/edit/BCPgyTme83d5Lm1W6x3K?p=preview
>>>
>>> Could you take a look?
>>>
>>> On Thursday, October 16, 2014 12:26:30 PM UTC-3, Sander Elias wrote:
>>>>
>>>> Hi Joberto,
>>>>
>>>> Sorry, I missed a little subtle part :-D
>>>>
>>>> try this:
>>>>
>>>> <div ng-repeat="timeSlot in timeSlots track by timeSlot.id" 
>>>> class="time-slot">
>>>>
>>>> Sorry for the confusion
>>>> 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