Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49103

Redirect to a view after successful save in ionic

$
0
0

@MohammedSalah wrote:

Hello,

How i redirect to another How to redirect to a another view after successful save ng-submit formafter successful post

.factory('Post', function($resource) {
  return $resource(api/add_new_order',{name: "@name", phone: "@phone", address: "@address",problem: "@problem", device: "@device", price: "@price"});
})
.controller('ContactCtrl', function($scope, Post, Authorization) {

  // Get all posts
  $scope.posts = Post.query();
  // Our form data for creating a new post with ng-model
  $scope.postData = {};
  $scope.newPost = function() {
    var post = new Post($scope.postData);
    post.$save();

  }
$scope.issues = {};
$scope.answer = function(){
    console.log($scope.issues.name);

}
$scope.postData = Authorization;
})

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49103

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>