Skip to content

kostyak76/angular-namespacer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

angular-namespacer

Namespaces your Angular modules!

Angular Namespacer essentially hacks angular.module and renames your Providers on the fly by concatenating the module name and provider name together. In order for this to effectively work, you must take advantage of the minification features.

angular.module('util', [])
  .namespace(true)
    .factory('thing', function() {
      return 1 + 2;
    });

angular.module('myApp', ['util'])
  .controller('MainCtrl', [
    // dependencies
    '$scope',
    'util.thing',
    // give your provider a fancy alias!
    function($scope, superAmazingThing) {
      $scope.sweetData = superAmazingThing;
    }
  ]);

About

Namespaces your Angular modules!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published