Skip to content

Commit 747c36f

Browse files
committed
upgrade to angular 1.6 promise methods, publish to npm
1 parent 54d5317 commit 747c36f

8 files changed

+19
-12
lines changed

Gruntfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ module.exports = function (grunt) {
5858
copy: {
5959
main: {
6060
files: [
61-
{src:'angular-busy.css',dest:'dist/'}
61+
{src:'angular-busy.css',dest:'dist/'},
62+
{src:'index.js',dest:'dist/'}
6263
]
6364
}
6465
},

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
## Getting Started
1010

11-
Install with Bower or download the files directly from the dist folder in the repo.
11+
Install with Bower, npm, yarn, or download the files directly from the dist folder in the repo.
1212

1313
```bash
1414
bower install angular-busy --save
15+
npm install @cgross/angular-busy
1516
```
1617

1718
Add `dist/angular-busy.js` and `dist/angular-busy.css` to your index.html.
@@ -91,6 +92,7 @@ Only the values you'd like overriden need to be specified.
9192

9293

9394
## Release History
95+
* v4.1.4 - Fixed deprecated Angular success promise methods for 1.6. Published to npm.
9496
* v4.1.3 - Fix for issue #45 and issue #49.
9597
* v4.1.2 - Small bugs fixed, wrapperClass option added.
9698
* v4.1.1 - Compatibility with Angular 1.3.

bower.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "angular-busy",
3-
"version": "4.1.3",
3+
"version": "4.1.4",
44
"main": [
55
"dist/angular-busy.js",
66
"dist/angular-busy.css"
77
],
88
"dependencies": {
9-
"angular": "~1.3",
10-
"angular-animate": "~1.3"
9+
"angular": ">=1.3",
10+
"angular-animate": ">=1.3"
1111
},
1212
"ignore": [
1313
"**/.*",

dist/angular-busy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
210210
currentTemplate = options.templateUrl;
211211
backdrop = options.backdrop;
212212

213-
$http.get(currentTemplate,{cache: $templateCache}).success(function(indicatorTemplate){
213+
$http.get(currentTemplate,{cache: $templateCache}).then(function(indicatorTemplate){
214214

215215
options.backdrop = typeof options.backdrop === 'undefined' ? true : options.backdrop;
216216

@@ -220,7 +220,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
220220
element.append(backdropElement);
221221
}
222222

223-
var template = '<div class="'+options.wrapperClass+' ng-hide" ng-show="$cgBusyIsActive()">' + indicatorTemplate + '</div>';
223+
var template = '<div class="'+options.wrapperClass+' ng-hide" ng-show="$cgBusyIsActive()">' + indicatorTemplate.data + '</div>';
224224
templateElement = $compile(template)(templateScope);
225225

226226
angular.element(templateElement.children()[0])
@@ -231,7 +231,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
231231
.css('bottom',0);
232232
element.append(templateElement);
233233

234-
}).error(function(data){
234+
}, function(data){
235235
throw new Error('Template specified for cgBusy ('+options.templateUrl+') could not be loaded. ' + data);
236236
});
237237
}

dist/angular-busy.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require('./angular-busy');
2+
module.exports = 'cgBusy';

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require('./angular-busy');
2+
module.exports = 'cgBusy';

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "angular-busy",
3-
"main": "angular-busy.js",
4-
"version": "4.1.3",
2+
"name": "@cgross/angular-busy",
3+
"main": "dist/index.js",
4+
"version": "4.1.4",
55
"description": "",
66
"repository": {
77
"type": "git",

0 commit comments

Comments
 (0)