From 8816083059629558cb9bcab2328465fdd67ac754 Mon Sep 17 00:00:00 2001 From: Willian Ganzert Lopes Date: Fri, 16 Oct 2015 16:18:23 -0300 Subject: [PATCH] Updated examples to support minify process MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added dépendances structure to support minify process --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3ef22ab..6bac2e0 100644 --- a/README.md +++ b/README.md @@ -25,18 +25,18 @@ configure it with an inputToken, which is done via the LogglyLoggerProvider: ```javascript angular.module( 'myApp', ['logglyLogger'] ) - .config( function( LogglyLoggerProvider ) { + .config(["LogglyLoggerProvider", function( LogglyLoggerProvider ) { LogglyLoggerProvider.inputToken( '' ); - } ); + } ]); - .run( function( LogglyLogger, $log ) { + .run(["LogglyLogger", "$log", function( LogglyLogger, $log ) { //This will be sent to both the console and Loggly $log.info( "I'm a little teapot." ); //This will be sent to loggly only LogglyLogger.sendMessage( 'Short and Stout.' ) - } + }]) ``` @@ -130,7 +130,7 @@ will include the key/values provided with all messages, plus the data to be sent Extra fields can also be added at runtime using the `LogglyLogger` service: ```javascript - app.controller( 'MainCtrl', function( $scope, $log, LogglyLogger ) { + app.controller( 'MainCtrl', ["$scope", "$log", "LogglyLogger", function( $scope, $log, LogglyLogger ) { logglyLogger.fields( { username: "foobar" } ); @@ -139,7 +139,7 @@ Extra fields can also be added at runtime using the `LogglyLogger` service: $log.info( 'All is good!' ); >> { appVersion: 1.1.0, browser: 'Chrome', username: 'foobar', level: 'WARN', message: 'All is good', url: 'http://google.com' } - } + }]) ```