Skip to content

Lightweight version of AngularJS' dependency injection and module loader system

Notifications You must be signed in to change notification settings

hassoncs/fangular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Fangular

Fangular implements a subset of AngularJS dependency injection and module loading system. It's a lightweight alternative to using the entire Angular library or using other DI libraries such as Bearcat.

Notes

  • Can be used in NodeJS / Cocos2d-js and other situations when there is no DOM available
  • Allows DRY auto-magic depdency injection using JavaScript magic
  • It doesn't require any dependencies on AngularJS

Example

 var app = fangular.module('app', []);
 
 app.run(function(DependencyC) {
    // DependencyC will be auto-magically injected
 });
 app.factory('DependencyA', function() {
   // Create and return DependencyA
 });
 app.factory('DependencyB', function() {
   // Create and return DependencyB
 });
 app.factory('DependencyC', function(DependencyA, DependencyB) {
   // DependencyA and DependencyB are both available!
   // Create and return DependencyC
 });

 fangular.start();

Version

0.1.0

Todos

  • Tests!
  • Implement all of angular's service providers
    • service()
    • provider()
    • config()
    • etc...
  • Add circular dependency detection and provide better logging

License

MIT

About

Lightweight version of AngularJS' dependency injection and module loader system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published