$log
Here is an example of it being set.
The main purpose of this service is to simplify debugging and troubleshooting.
Methods
log();
Write a log messageinfo();
Write an information messagewarn();
Write a warning messageerror();
Write an error messagedebug();
Write a debug message
This is only available in AngularJs 1.1.2 or later.
By default it is on.Here is an example of it being set.
var app = angular.module('app', []);
app.config(function($logProvider){
$logProvider.debugEnabled(true);
});
app.controller('MainCtrl', function($scope, $log ) {
$scope.name = 'World';
$scope.model = {value: "test"};
$log.debug('TEST Log');
});
1 Comments
This comment has been removed by the author.
ReplyDelete