使用angularjs在弹出窗口中动态加载内容
如何根据单击的div在弹出窗口中动态加载json数据 我的代码在这里:使用angularjs在弹出窗口中动态加载内容,angularjs,angularjs-directive,angularjs-ng-repeat,Angularjs,Angularjs Directive,Angularjs Ng Repeat,如何根据单击的div在弹出窗口中动态加载json数据 我的代码在这里: <div class="col-xs-12 col-sm-6 col-lg-4 checkContent" ng-repeat = "appreciate in CustAppre" ng-click = "openBigDiv()"> <div class="quote-inner-wrapper"> &l
<div class="col-xs-12 col-sm-6 col-lg-4 checkContent" ng-repeat = "appreciate in CustAppre" ng-click = "openBigDiv()">
<div class="quote-inner-wrapper">
<div class="arrow_box blue-texture-bg custApprPopOver">
<blockquote class="no-bg white quotation-white">
<p>{{appreciate.appre}}</p>
<span class = "hideContent">{{appreciate.custContent}}</span>
</blockquote>
</div>
<a role="button" class="customerName blue" href="#">{{appreciate.by}}</a>
</div>
</div>
在按钮上,您可以有一个打开div的功能,就像
<button type='button' class="customerName blue" ng-click="myfunction(appreciate.by)"> {{appreciate.by}} </button>
{{欣赏.by}
为了便于理解,使用按钮代替链接:)
在控制器中,您可以进行比较或在弹出窗口中显示数据所需的内容。您可以向我显示
openBigDiv()“
函数吗?我在openBigDiv()中只有div.show()。我应该在openBigDiv()中写什么因此,当单击div时,弹出窗口将动态加载。感谢Ramesh的快速回复Sue是单击时打开的所有div我只希望该div与单击的内容一起打开。openBigDiv函数为:$scope.ishiden=true;$scope.openBigDiv=function(){//如果DIV是隐藏的,它将是可见的,反之亦然。$scope.ishiden=$scope.ishiden?false:true;}我确实有函数,但我的问题是如何编写/设置单击函数的框架,以便根据单击的DIV动态加载弹出窗口。谢谢。
<button type='button' class="customerName blue" ng-click="myfunction(appreciate.by)"> {{appreciate.by}} </button>