tommyd456 tommyd456 - 1 month ago 15
AngularJS Question

Gist-embed with Angular app

Trying to get gist-embed ( working within my Angular app but with no luck.

It works no problem on my homepage (which is not part of the Angular app) but when I use something like:

<code data-gist-id="<gist-id>"></code>

within the app it won't show. There are no messages in the console to explain why though.

Could someone explain why and offer a solution?

mpm mpm
(function($) {

  $(function() {
    // find all elements containing "data-gist-id" attribute.
    $('[data-gist-id]').each(function() {
      var $elem = $(this),

that lib is coded in such a way one cant really use it in angular,you'll have to look for a fork that offers a proper jquery plugin architecture you can use into a directive.That lib doesnt respect basic jQuery plugin architecture.

And no Error will show up because it's likely the .each will execute before your angular app runs.