ng-http-loader | Smart angular HTTP interceptor - Intercepts | Reactive Programming library
kandi X-RAY | ng-http-loader Summary
kandi X-RAY | ng-http-loader Summary
:dango: Smart angular HTTP interceptor - Intercepts automagically HTTP requests and shows a spinkit spinner / loader / progress bar
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ng-http-loader
ng-http-loader Key Features
ng-http-loader Examples and Code Snippets
Community Discussions
Trending Discussions on ng-http-loader
QUESTION
I am trying to implement spinner for angular api calls using 'ng-http-loader'. The code works fine, however while building my app 'Yarn build' it fails with below error:
ERROR in Directive AbstractLoaderDirective in E:/~/node_modules/ng-http-loader/ng-http-loader.d.ts has no selector, please add it! Cannot determine the module for class AbstractLoaderDirective in E:/~/node_modules/ng-http-loader/ng-http-loader.d.ts! Add AbstractLoaderDirective to the NgModule to fix it.
Has anyone came across this error?
Implementation Following the steps provided in: https://www.npmjs.com/package/ng-http-loader
...ANSWER
Answered 2020-Apr-08 at 15:09ng-http-loader version 7.0.0 has breaking changes, try installing "ng-http-loader": "^6.0.1"
and the error should go away.
QUESTION
I am building a SPA where the homepage will include multiple components. I would like to have a loading spinner for each components, without an overlay and only showing within the component.
I have implemented ng-http-loader 6.0.1
, but it created an overlay and the spinner is shown over the whole page. I did not find any option which would force it stay within that specific component.
If not, what would be the best way? Hardcode the spinner and when the http
request returns the result, replace the spinner with the results? I think there must be a better way of doing this.
Example http
call which is using @angular/common/http HttpClient
:
ANSWER
Answered 2020-Jan-23 at 08:06Here is an easy method to achieve the component level spinner:
Create a small component called 'Spinner'.
Include spinner inside the components that make web service requests
Control the visibility of the Spinner component using ng-hide or ng-show
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ng-http-loader
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page