Javascript 如何在英语中使用情态动词
我有4个按钮,它们调用模态引导窗口,当我使用$scope的变量加载函数html tentle时,但是模态窗口不使用$scope,我以前问过这个问题,有使用指令的答案,但坦率地说,我不明白它是如何工作的,下面是一个例子Javascript 如何在英语中使用情态动词,javascript,angularjs,twitter-bootstrap,Javascript,Angularjs,Twitter Bootstrap,我有4个按钮,它们调用模态引导窗口,当我使用$scope的变量加载函数html tentle时,但是模态窗口不使用$scope,我以前问过这个问题,有使用指令的答案,但坦率地说,我不明白它是如何工作的,下面是一个例子 <div class="infBox" data-toggle="modal" data-target="#myModal" ng-click="modal('Modals/modal2', row.Name)"> <h4>BUILD
<div class="infBox" data-toggle="modal" data-target="#myModal" ng-click="modal('Modals/modal2', row.Name)">
<h4>BUILD</h4>
<div>
<img ng-class="{opac: row.Commit.Build.Debug == false}" src="IMG/computer-md.png">
<img ng-class="{opac: row.Commit.Build.Release == false}" src="IMG/computer-md.png">
</div>
<span class="debug">Debug</span><span>Release</span>
<span class="time">{{row.Commit.Build.Timefin}}</span>
</div>
这是一个加载Tentale的函数
<h4>BUILD</h4>
<div>
<img ng-class="{opac: ModalObj.Commit.Build.Debug == false}" src="IMG/computer-md.png">
<img ng-class="{opac: ModalObj.Commit.Build.Release == false}" src="IMG/computer-md.png">
</div>
<span class="debug">Debug</span><span>Release</span>
<span class="time">{{ModalObj.Commit.Build.Timefin}}</span>
构建
调试版本
{{ModalObj.Commit.Build.Timefin}
这是Denterale这是你的最后一篇文章,Nishi向你推荐得很好 如果你不理解的话,请考虑一些建议。
writeYourAppName.directive('modal', function () {
return {
template: 'Your Modal Window Code',
并使用控制器将值传递给您可能需要使用的模型。除了@Sumeet Gohil answer之外,还有一个AngularJS模式实现(但不带引导标记),它处理模式中单独的$scope-
<h4>BUILD</h4>
<div>
<img ng-class="{opac: ModalObj.Commit.Build.Debug == false}" src="IMG/computer-md.png">
<img ng-class="{opac: ModalObj.Commit.Build.Release == false}" src="IMG/computer-md.png">
</div>
<span class="debug">Debug</span><span>Release</span>
<span class="time">{{ModalObj.Commit.Build.Timefin}}</span>
writeYourAppName.directive('modal', function () {
return {
template: 'Your Modal Window Code',