I'm trying to display webview using angularjs and make the webview url stocken in a list of webviews : webview.url. The problem is when a person start navigate in the webview, the url change in the webview (src attribute) but not in the webvew.url in the list of items. To understand this issue I made this example with Iframe : http://plnkr.co/edit/MTgNNNZefliS507Fw0Jj?p=preview
How can I make the src value changing in the webview modifie automatically the webview.url in my list of items ? I mean make ng-src 2-way-binding.
Thanks!
In my page:
<ul id="myviews" class="cd-nav">
<li id="{{webView.id}}" ng-repeat="webView in webViews">
<webview id="webview{{webView.id}}" class="mywebviews" ng-src="{{webView.url}}">
</webview>
</li>
</ul>
In my app.js :
var trustedUrl = $scope.trustSrc("http://google.com");
$scope.webViews = [
{
id : "webview0",
url: trustedUrl,
classe: "opened"
}
];
When a client try to visit an url:
var idnewwebview = $scope.webViews.length + 1;
var trustedUrl =.// Recupered via an input...
$scope.webViews.push(
{
id : idnewwebview,
url: trustedUrl,
classe: "opened"
}
);