Add test for subscribe on single object

This commit is contained in:
sigita42 2015-05-10 15:44:56 +02:00
parent 5c11852cd6
commit 97f329eb6d

View File

@ -18,6 +18,7 @@ interface CustomScope extends angular.meteor.IScope {
todo: ITodo;
todoNotAuto: TodoAngularMeteorObject;
todoSubscribed: TodoAngularMeteorObject;
save: (todo: ITodo) => void;
saveAll: () =>void;
@ -48,6 +49,7 @@ app.controller("mainCtrl", ['$scope', '$meteor', ($scope: CustomScope, $meteor:
$scope.notAutoTodos = $meteor.collection(Todos, false).subscribe("publicTodos");
$scope.todoNotAuto = <TodoAngularMeteorObject>$meteor.object(Todos, 'TodoID', false);
$scope.todoSubscribed = <TodoAngularMeteorObject>$meteor.object(Todos, 'TodoID').subscribe('todos');
$scope.todo = $scope.todoNotAuto.getRawObject();
$scope.todoNotAuto.reset();
$scope.todoNotAuto.save($scope.todo).then((data) => { return data == 1; });;