Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
themeEclipse
languagejs
titleRegistrando e Utilizando Providers
linenumberstrue
fooModule.provider( 'fooProvider', function() {
 
	var barName = '';
    this.foo = function() {
		console.log('This is foo serviceprovider printing ' + barName + ' :)');
    };
 
	this.$get = function () {
        return this;
    };
});
 
fooModule.controller('fooController', ['foo', function( fooProvider ) {
	
	fooProvider.foo();
	
}]);

...