Skip to content

Commit

Permalink
upgrade to angular 1.6 promise methods, publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
cgross committed Jan 5, 2017
1 parent 54d5317 commit 747c36f
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ module.exports = function (grunt) {
copy: {
main: {
files: [
{src:'angular-busy.css',dest:'dist/'}
{src:'angular-busy.css',dest:'dist/'},
{src:'index.js',dest:'dist/'}
]
}
},
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

## Getting Started

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

```bash
bower install angular-busy --save
npm install @cgross/angular-busy
```

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


## Release History
* v4.1.4 - Fixed deprecated Angular success promise methods for 1.6. Published to npm.
* v4.1.3 - Fix for issue #45 and issue #49.
* v4.1.2 - Small bugs fixed, wrapperClass option added.
* v4.1.1 - Compatibility with Angular 1.3.
Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "angular-busy",
"version": "4.1.3",
"version": "4.1.4",
"main": [
"dist/angular-busy.js",
"dist/angular-busy.css"
],
"dependencies": {
"angular": "~1.3",
"angular-animate": "~1.3"
"angular": ">=1.3",
"angular-animate": ">=1.3"
},
"ignore": [
"**/.*",
Expand Down
6 changes: 3 additions & 3 deletions dist/angular-busy.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
currentTemplate = options.templateUrl;
backdrop = options.backdrop;

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

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

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

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

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

}).error(function(data){
}, function(data){
throw new Error('Template specified for cgBusy ('+options.templateUrl+') could not be loaded. ' + data);
});
}
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-busy.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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require('./angular-busy');
module.exports = 'cgBusy';
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require('./angular-busy');
module.exports = 'cgBusy';
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-busy",
"main": "angular-busy.js",
"version": "4.1.3",
"name": "@cgross/angular-busy",
"main": "dist/index.js",
"version": "4.1.4",
"description": "",
"repository": {
"type": "git",
Expand Down

0 comments on commit 747c36f

Please sign in to comment.