mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
18 lines
353 B
JavaScript
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
|
|
}
|
|
)
|
|
}
|
|
}
|
|
}
|