Show socket status in the UI. Absolutely no styling yet.

This commit is contained in:
Simo Kinnunen
2014-03-20 15:30:49 +09:00
parent 47ecd9d37e
commit 5771507fc9
5 changed files with 72 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
module.exports = function SocketStateDirectiveFactory(socket) {
return {
restrict: 'E'
, template: require('./socket-state.jade')
, scope: {
}
, link: function (scope) {
scope.$watch(
function() {
return socket.state
}
, function(state) {
scope.state = state
}
)
}
}
}