GithubHelp home page GithubHelp logo

ng-busy's People

Contributors

sky4ce avatar victos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ng-busy's Issues

Directive ngBusy works only with array

'@component({
selector: 'some',
template: <div [ngBusy]="busy"></div>
})
busy: Subscription;'

But it doesn't work. Work only when you include 'busy' in array. Example '<div [ngBusy]="[busy]">'.
My version angular 5.2.2 and

issues adding ng-busy to Angular 5.2.1

Hi all,
I'm currently adding ng-busy to my angular 5.2.1 application using WebPack with AOT. I've hit a few issues using the guide from npm (https://www.npmjs.com/package/ng-busy) and just thought I'd post them here for anyone who might be experiencing the same troubles, and maybe a fix/documentation update in the future (assuming its not something that is specific to my setup which it very well could be).

  1. <-- Simple syntax does not work. --> <div [ngBusy]="busy">
    BUT
    <-- Advanced syntax does work --><div [ngBusy]="{busy: busy}">

  2. In the root application module: "NgBusyModule.forRoot({})" results in "Property 'forRoot' does not exist on type 'typeof ngBusyModule'

  3. trying to use a component in the Application module, the component must be added to the list of entryComponents:
    declarations: [
    ...
    BrowserAnimationsModule,
    NgBusyModule,
    CustomBusyComponent,
    ...
    ],
    entryComponents: [
    ...
    CustomBusyComponent,
    ...
    ],
    imports: [ ... ],

  4. I'm also getting a non-breaking error that I've been unable to resolve. When adding message as in the documentation: "ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'null: undefined'. Current value: 'null: Loading...'. It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"

Thanks

Busy Indicator Doesn't Appear With Observable returned From Service

Using ng-busy 1.4.3 and Angular 5.x. Using an Angular Service injected into Component that returns an Observable:

Inside the service:
public doIt(): Observable<any> { return Observable.create(s => { setTimeout(() => { console.log("We are done") s.complete(); }, 5000); }); }

In the component:
this.busy = this.myService.doIt().subscribe();

The indicator does not appear.

However if I take all the code inside the service and move it inline to the component it works fine! So the issue appears to be related to getting the observable from a service.

ExpressionChangedAfterItHasBeenCheckedError

Is there any way to avoid this annoying message?
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ngIf: false'. Current value: 'ngIf: true'

"Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ngIf: false'. Current value: 'ngIf: true'.
at viewDebugError (webpack://%5Bname%5D_%5Bhash%5D/./node_modules/@angular/core/fesm5/core.js?:8717:15)
at expressionChangedAfterItHasBeenCheckedError (webpack://%5Bname%5D_%5Bhash%5D/./node_modules/@angular/core/fesm5/core.js?:8705:12)
at checkBindingNoChanges (webpack://%5Bname%5D_%5Bhash%5D/./node_modules/@angular/core/fesm5/core.js?:8807:15)
at checkNoChangesNodeInline (webpack://%5Bname%5D_%5Bhash%5D/./node_modules/@angular/core/fesm5/core.js?:11673:9)
at checkNoChangesNode (webpack://%5Bname%5D_%5Bhash%5D/./node_modules/@angular/core/fesm5/core.js?:11662:9)
at debugCheckNoChangesNode (webpack://%5Bname%5D_%5Bhash%5D/./node_modules/@angular/core/fesm5/core.js?:12269:24)
at debugCheckDirectivesFn (webpack://%5Bname%5D_%5Bhash%5D/./node_modules/@angular/core/fesm5/core.js?:12197:13)
at Object.eval [as updateDirectives] (ng:///NgBusyModule/NgBusyComponent.ngfactory.js:26:5)
at Object.debugUpdateDirectives [as updateDirectives] (webpack://%5Bname%5D_%5Bhash%5D/./node_modules/@angular/core/fesm5/core.js?:12186:21)
at checkNoChangesView (webpack://%5Bname%5D_%5Bhash%5D/./node_modules/@angular/core/fesm5/core.js?:11561:14)"

Slide in animation not working

I am updating a project to use your module from devyumao's angular2-busy. Once I updated, I noticed that the slide in animation when the throbber appears is gone. I also couldn't see the effect in your demo. Is this intended? I couldn't see anything in the CSS file that changed between the two projects to lose the animation.

Thanks for updating the project, and thanks for the help.

Angular 6 Update for RxJS 6 not in compatibility mode

Looks like the NgBusy needs an update for Angular 6 to allow for use with RxJS v6 outside of compatibility mode. Might be worth a version bump to v2.0? Only needs to replace the imports using rxjs/Subscription a handful of times to be just rxjs.

I'd PR an update, but not sure what needs to change in build.js globals and external.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.