Which of the following is the correct way to pass data between Controller/View in Ionic?
Ionic Framework MCQs
Which of the following is the correct way to pass data between Controller/View in Ionic?
Answer
Correct Answer: .controller('SearchCtrl', function($scope, $state, $http) { $scope.search = function() { console.log('Starting search..'); var res = $http.post('http://endpoint:8080/search',{"language":"en"}) .success(function(data) { alert("Search OK"); //take the data.results and make sure its available when I move to tab.search-results $state.go('tabs.search-results', {result: data}); }).error(function(data) { alert("Search Bad"); }); }; })
Explanation:
Note: This Question is unanswered, help us to find answer for this one