Last active
December 21, 2015 19:59
-
-
Save alejandroiglesias/6358435 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('notification', function ($document, $templateCache, $compile) { | |
return { | |
show: function (message) { | |
// Compile template. | |
var template = $templateCache.get('template/notification.html'); | |
console.log('tpl', $compile(template)); // This breaks | |
// Append notifications to DOM element. | |
// $document.find('#notifications').append(el); | |
} | |
}; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="template/notification.html" type="text/ng-template"> | |
<div class="friends-invited-popup"> | |
<div class="tooltip-info"> | |
<div class="kenny"> | |
<img src="{% static 'images/tooltip-info-kenny.png' %}"> | |
</div> | |
<div class="content"> | |
<div class="txt">{{message}}</div> | |
</div> | |
</div> | |
</div> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment