Logging to the console.

This commit is contained in:
Gunther Brunner
2014-05-12 19:28:56 +09:00
parent 2183bbba49
commit 3b6da1542b
2 changed files with 23 additions and 3 deletions

View File

@@ -1,3 +1,24 @@
module.exports = function LogsCtrl($scope) {
module.exports = function LogsCtrl($scope, socket) {
var filters = []
socket.scoped($scope).on('logcat.entry', function (entry) {
console.log(entry)
})
$scope.$watch('started', function (newValue, oldValue) {
if (newValue !== oldValue) {
if (newValue) {
$scope.control.startLogcat(filters).then(function (result) {
})
} else {
$scope.control.stopLogcat()
}
}
});
}