I am developing an hybrid mobile app in ionic and cordova. In this app I am using ngCordova InAppBrowse for load a html page into app.
Controller Code:
module.controller('MyCtrl', function($cordovaInAppBrowser) {
$scope.name="Rakesh";
var options = {
location: 'yes',
clearcache: 'yes',
toolbar: 'no'
};
$cordovaInAppBrowser.open('mypage.html', '_blank', options)
.then(function(event) {
// success
})
.catch(function(event) {
// error
});
$rootScope.$on('$cordovaInAppBrowser:loadstart', function(e, event){
});
$rootScope.$on('$cordovaInAppBrowser:loadstop', function(e, event){
});
$rootScope.$on('$cordovaInAppBrowser:loaderror', function(e, event){
});
$rootScope.$on('$cordovaInAppBrowser:exit', function(e, event){
});
});
HTML Page (mypage.html)
<!DOCTYPE html>
<html>
<head>
<title>InAppBrowser - Test Page</title>
</head>
<body>
<form name="sendParam" method="post" action="https://www.example.com/payment">
<input type="text" id="name" name="name" value="" />
<input type="submit" value="enter">
</form >
</body>
</html>
What I Want?
I want to set or pass MyCtrl's $scope.name
value to mypage.html name text field
.