最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How should i use lightbox with angular - Stack Overflow

programmeradmin4浏览0评论

I am using angular to shows the details of my Student Object

it is working fine

But also want the hyperlink on assignment text so that when someone click on that a lightbox opens with all the assignment object details.

Now my boss want to use angular only.

i know that i can use jquery modal dialog for that but how can i display lighbox in angularJs

I am using angular to shows the details of my Student Object

it is working fine

But also want the hyperlink on assignment text so that when someone click on that a lightbox opens with all the assignment object details.

Now my boss want to use angular only.

i know that i can use jquery modal dialog for that but how can i display lighbox in angularJs

Share Improve this question asked Feb 26, 2013 at 6:01 user192082107user192082107 1,3874 gold badges15 silver badges19 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 2

You should be able to integrate this project:

https://github./pact/angular-bootstrap-lightbox

From the project's README, here's how it would be declared in your HTML:

Gallery:

<ul ng-controller="GalleryCtrl">
  <li ng-repeat="image in images">
    <a ng-click="openLightboxModal($index)">
      <img ng-src="{{image.thumbUrl}}" class="img-thumbnail" alt="">
    </a>
  </li>
</ul>

Just like @Stewie's solution, the heavy lifting logic is handled by an Angular Directive.

Go learn about Angular directives and take a look at how AngularUI or UI Bootstrap utilizes directives to proxy the invocations to jQuery plugins.

发布评论

评论列表(0)

  1. 暂无评论