Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

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

varapp=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

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages