0
我需要一些帮助。我需要使用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:
<div>Hello</div>
<div id="dvMap" style="width:1000px; height:1000px;">{{latitude}}</div>
在此页面中我想显示传递value.My full plunkr code在这里。请帮帮我。
@subhra,请查看我的回答,我已经给了plunker。 – Sravan
是的,它的到来。但点击链接后,它应该在不同的页面中打开。 – subhra
谢谢。它的工作。 – subhra