私はいくつかの助けが必要です。 Angular.jsを使って別のページに値を渡す必要があります。私は以下のコードを説明しています。Angular.jsを使用して異なるページにパラメータを渡す方法
<div class="input-group bmargindiv1 col-md-12">
<span class="input-group-addon ndrftextwidth text-right oditek-form" style="width:180px">Latitude:</span>
<input type="text" name="latitude" id="latitude" class="form-control oditek-form" placeholder="Add Latitude coordinate" ng-model="latitude" ng-keypress="clearField('businessno');">
</div>
<div class="input-group bmargindiv1 col-md-12" ng-if=" latitude">
<a ng-click="demo()" target="_blank" href="">Display Location On The Map</a>
</div>
ここでは、新しいタブで開いている別のページにLatitude
フィールド値を渡す必要があります。私のコントローラ側のコードを以下に示します。
var newCustomer=angular.module('Spesh');
newCustomer.controller('newController',function($scope,$state){
$scope.demo=function(){
var base_url = "index.html#"
var url = $state.href('map', {});
window.open(base_url+url,'_blank');
}
})
map.html:私はvalue.My full plunkr code渡されたことを表示したい。このページで
<div>Hello</div>
<div id="dvMap" style="width:1000px; height:1000px;">{{latitude}}</div>
はこちらです。私を助けてください。
@subhra、私の答えと私が与えたプランナーを確認してください。 – Sravan
はい、来る。しかし、リンクをクリックすると別のページで開くはずです。 – subhra
ありがとうございます。その働き。 – subhra