Skip to content

Commit

Permalink
fixes for angular 1.6, and publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
cgross committed Jan 5, 2017
1 parent 4d159b6 commit 4e6ea95
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 12 deletions.
3 changes: 2 additions & 1 deletion Gruntfile.js
Expand Up @@ -42,7 +42,8 @@ module.exports = function (grunt) {
copy: {
main: {
files: [
{src:'angular-notify.css',dest:'dist/'}
{src:'angular-notify.css',dest:'dist/'},
{src:'index.js',dest:'dist/'}
]
}
},
Expand Down
6 changes: 3 additions & 3 deletions angular-notify.js
Expand Up @@ -36,9 +36,9 @@ angular.module('cgNotify', []).factory('notify',['$timeout','$http','$compile','
}
}

$http.get(args.templateUrl,{cache: $templateCache}).success(function(template){
$http.get(args.templateUrl,{cache: $templateCache}).then(function(template){

var templateElement = $compile(template)(scope);
var templateElement = $compile(template.data)(scope);
templateElement.bind('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function(e){
if (e.propertyName === 'opacity' || e.currentTarget.style.opacity === 0 ||
(e.originalEvent && e.originalEvent.propertyName === 'opacity')){
Expand Down Expand Up @@ -107,7 +107,7 @@ angular.module('cgNotify', []).factory('notify',['$timeout','$http','$compile','
},args.duration);
}

}).error(function(data){
}, function(data) {
throw new Error('Template specified for cgNotify ('+args.templateUrl+') could not be loaded. ' + data);
});

Expand Down
4 changes: 2 additions & 2 deletions bower.json
Expand Up @@ -4,7 +4,7 @@
"dist/angular-notify.js",
"dist/angular-notify.css"
],
"version": "2.5.0",
"version": "2.5.1",
"homepage": "https://github.com/cgross/angular-notify",
"authors": [
"Chris Gross <schtoo@schtoo.com>"
Expand All @@ -31,6 +31,6 @@
"demo"
],
"dependencies": {
"angular": "~1.3"
"angular": ">=1.3"
}
}
6 changes: 3 additions & 3 deletions dist/angular-notify.js
Expand Up @@ -36,9 +36,9 @@ angular.module('cgNotify', []).factory('notify',['$timeout','$http','$compile','
}
}

$http.get(args.templateUrl,{cache: $templateCache}).success(function(template){
$http.get(args.templateUrl,{cache: $templateCache}).then(function(template){

var templateElement = $compile(template)(scope);
var templateElement = $compile(template.data)(scope);
templateElement.bind('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function(e){
if (e.propertyName === 'opacity' || e.currentTarget.style.opacity === 0 ||
(e.originalEvent && e.originalEvent.propertyName === 'opacity')){
Expand Down Expand Up @@ -107,7 +107,7 @@ angular.module('cgNotify', []).factory('notify',['$timeout','$http','$compile','
},args.duration);
}

}).error(function(data){
}, function(data) {
throw new Error('Template specified for cgNotify ('+args.templateUrl+') could not be loaded. ' + data);
});

Expand Down
2 changes: 1 addition & 1 deletion dist/angular-notify.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dist/index.js
@@ -0,0 +1,2 @@
require('./angular-notify');
module.exports = 'cgNotify';
2 changes: 2 additions & 0 deletions index.js
@@ -0,0 +1,2 @@
require('./angular-notify');
module.exports = 'cgNotify';
5 changes: 3 additions & 2 deletions package.json
@@ -1,6 +1,7 @@
{
"name": "angular-notify",
"version": "2.5.0",
"name": "@cgross/angular-notify",
"main":"dist/index.js",
"version": "2.5.1",
"description": "A minimalistic notification service for angular.",
"repository": {
"type": "git",
Expand Down

0 comments on commit 4e6ea95

Please sign in to comment.