(function () { "use strict"; var QuestionsController = function ($scope, $location, userService) { $scope.model = { question: '' }; $scope.callback = function (prompt) { $location.url('/memory/add?questionId=' + prompt.promptId); }; userService.getPromptsAllAsked().then(prompts => { $scope.allAsked = prompts; $scope.haveAsked = prompts && prompts.length; }); }; QuestionsController.$inject = ['$scope', '$location', 'userService']; angular.module('streamApp').controller('questionsController', QuestionsController); })();