mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-25 15:25:17 +02:00
19 lines
353 B
JavaScript
19 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
|
|
}
|
|
)
|
|
}
|
|
}
|
|
}
|