$rootScope.Posts.insert(post).remote.then(function (id) {
            $state.go("postEdit", {postId: id});
        }, function (err) {
            console.log(err);
        });