angular-busy icon indicating copy to clipboard operation
angular-busy copied to clipboard

Allow for truey variables or boolean

Open cboden opened this issue 10 years ago • 7 comments

Since promise wrapping has been deprecated in Angular 1.2 it makes less sense to bind promises to the template scope. I would find it easier just to pass a boolean value to cg-busy.

cboden avatar May 13 '14 17:05 cboden

Aren't your ajax calls returning promises? It would seem harder to assign booleans since you'd have to add a then() and set a flag...?

cgross avatar Jul 06 '14 17:07 cgross

"yes" to both of your questions. I am using a boolean already for other triggers. In addition I do a lot of calculation after my data comes back so I want the cg-busy to stay up longer. I'm currently achieving this by creating a second promise.

cboden avatar Aug 12 '14 17:08 cboden

Vote +1 :) That would be really helpful to have this option to just pass a boolean

muluc avatar Sep 15 '14 22:09 muluc

I think the benefit of this plugin is in it's simplicity and not needing any flags like @cgross mentioned above. If you want to go the boolean route, why not just use an animated loading icon with ng-show?

browndp08 avatar Jun 19 '15 16:06 browndp08

+1, even more than 1... +5!! i would like to have ability to use both promise and boolean.

Shemesh avatar Aug 05 '15 15:08 Shemesh

+1 for boolean. I have multiple promises active in sub-directives, but I track them in central place using http interceptor, where I have a count of active requests. If that count is > 0, one busy covering the whole main directive should be shown. Only when all of them finish loading the busy directive should disappear.

anilmujagic avatar Nov 26 '15 23:11 anilmujagic

Done in https://github.com/myflowpl/angular-busy2/commit/ab9845ba1a2592f2f05ca3d613f983db9f421675 [email protected] node_modules/angular-busy2

hinol avatar Mar 24 '16 13:03 hinol