npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sepehrazizi/ng-easy-loader

v0.1.2

Published

Easy to use http request loading indicator for your Angular app.

Downloads

8

Readme

Angular Easy Loader

This plugin helps you add a loader to your project VERY EASILY. This loader mostly is used when you want to show a progress indicator to user when there is a http request in the background running.

How to use it?

Very Simple! First import EasyLoaderComponent and wrap the most top-level html element (mostly located in app.component.html) with <easy-loader-wrapper></easy-loader-wrapper>. Then add this one little piece of code to your http request function in your service file. Keep in mind it is recommended that the service function returns Observable or Promise

simple use

What if i want to show my own progress indicator in my own way?

All you have to do is to do the simple steps below:

  • Pass false to @WithEasyLoader(). Like this: @WithEasyLoader(false). this will disable the default progress indicator for this function.
  • Define a variable in your component and use this decorator for it: @BindTo().
  • Now pass the name of the service function to @BindTo(). Like this: @BindTo("myHttpRequest")
  • Finally you can either listen to it in you component .ts file or use it in your html template with async pipe.

moderate use

I used two @BindTo annotations for same service function. why both variables changes?

The use-case for this scenario is when you have one single service function which is multi-purpose and only the input data changes. in this case you have to use @ActionButton annotation.

  • First add a second parameter to @BindTo annotation. this second parameter is string and can be anything your want for example: @BindTo("myHttpRequest", "1").
  • Now add the @ActionButton with same exact inputs as @BindTo to the function which triggers the service function call.

enter image description here

Donation?

Thank you very much indeed!!!

  • (Bitcoin) bc1q0hzfgfhw6cpam90kj0s45h0jj222w7mrsexem7

  • (USDT Tron Network) TRoSbkdspucUR9PTK2Wdieq9ZMvkohb7fm

  • (Ethereum ETH Network) 0xa7Ecf7D686C3B9521a4cC272effDf30B45779bf8

  • (TRX) TRoSbkdspucUR9PTK2Wdieq9ZMvkohb7fm