Actually am sending the data from registration form with multiple scopes ie (veh_register,noofpass,avilableData,foundedClass).......
Every scope object has data like veh_register :{ "vin" : vin89, "vplnum" :AR 890S, "uni" :proxu} noofpass : { noofpass : 900} availableData : {"Class" : 9009, "name" : manish} etc...... like that
Then how to combine them as single scope object to send it over $http.Post
Here is Clear Cut Code .........
Controller Method In AngularJs
$scope.vechicle_Register=function(veh_register,noofpass,avilableData, foundedClass,selectedOption1,selectedOption2){
**How to merge these veh_register+noofpass+avilableData+...........**
Into single Scope that send it from here to Target .........
$http.post("interface.php?action=sendVehRegDetails").then(function(result) {
$scope.year=result['data'];
});
}
You can use the extend function in Angular:
https://docs.angularjs.org/api/ng/function/angular.extend
Extends the destination object dst by copying all of the properties from the src object(s) to dst. You can specify multiple src objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With