1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 10:19:30 +02:00
OpenSTF/res/app/components/stf/socket/socket-state-directive.js

18 lines
353 B
JavaScript

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
}
)
}
}
}