Skip to content

Commit 8955c62

Browse files
author
Arush Sehgal
committed
small bug on create model
1 parent 720492d commit 8955c62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/scripts/controllers/master-detail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ angular.module('demo')
122122
// new up the model
123123
$scope.masterDetailCtrl.collection.addMonster('Joe', 'exploding feces').then(function() {
124124

125-
alert('OMG you created a monster named: ' + $scope.masterDetailCtrl.collection.last().get('name'));
125+
alert('OMG you created a monster named: ' + $scope.masterDetailCtrl.collection.first().get('name'));
126126

127127
});
128128

0 commit comments

Comments
 (0)