Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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);
<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 class="content">
<div class="txt">{{message}}</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.