我在Angular JS项目中使用Zurb Foundation 5.5.3,并试图执行一个揭示模式。我在社区上寻找这个问题,但没有解决方案成功,因为我不会忘记 data-reveal 属性,或者我不想调用 { {3}}
这是我的代码:
<div class="small-1 columns">
<a href="#" data-reveal-id="myModal">Click Me For A Modal</a>
</div>
<div id="myModal" class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h2 id="modalTitle">Awesome. I have it.</h2>
<p class="lead">Your couch. It is mine.</p>
<p>I'm a cool paragraph that lives inside of an even cooler modal. Wins!</p>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
它与Foundation文档中的JS via相同。当我点击链接时,模态不会出现,页面会重定向到主页。
有什么想法吗?
提前致谢!
答案 0 :(得分:-1)
您在此处引用了类似的问题: Foundation and AngularJS
使用Foundation 5和AngularJS时,JavaScript摘要周期存在冲突,因此默认情况下它们不会一起工作。
我成功使用了两种不同的解决方案:
我更喜欢使用后者。