Giter Club home page Giter Club logo

fox-angular-loading's Introduction

Angular <fox-loading> element


Requirements

Usage

  • Load
<script src="fox-angular-loading.js"></script>
  • Include module dependency
angular.module('myApp', ['fox.loading']);
  • Use
<fox-loading until="expr == true" timeout="3"></fox-loading>

Documentation

Put the element inside the place where you want it to appear until some resource is done loading.

Ex:

<div class="parent">
	<fox-loading until="items.length > 0"></fox-loading>
	<ul>
		<li ng-repeat="item in items">{{item.name}}</li>
	</ul>
</div>

The element will hide itself when some items are loaded and the array is greater than 0. Of course you could write it as until="items.length" =)

Attributes

  • until - Expression to be evaluated that keeps the element showing until it becomes true. In that case, it hides itself
  • timeout - The loading element will hide itself after so many seconds have passed even if the until expression is false

Transclude

The element supports transcluding with anything that shoud be shown until some resource is done loading. It could be from simple rotating gif to a complete progress bar, a loading message or nothing at all.

CSS

You can define a .loading class anywhere in your CSS to style the loading element. If you don't want to use a transcluding element, it could be a simple background gif.

Contributing

Clone the repo, npm install, grunt dev and start coding

fox-angular-loading's People

Contributors

orapouso avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.