借用setTimeout()
函数实现,在指令渲染完成之后,执行需要执行的函数。
export default class {
/*@ngInject*/
constructor() {
thi
constructor() {
thi.restrict = 'E';
this.scope = {
ngSrc: '@ = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style = {
ngSrc = {
ngSrc: '@'
};
this.template = `<div class="player" layout = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px">
<div id={{id = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column ngSrc '@ };
this = {
ngSrc: '@'
};
this.template = `<div class="player" layout = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px">
<div id={{id}} class = {
ngSrc = {
ngSrc: '@'
};
this.template = `<div class="player" layout ngSrc ngSrc: '@'
};
this.template = `<div class="player" layout="column ngSrc'@ };
this = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px">
<div id={{id}} class="flowplayer">
</div>
</div>`;
}
link(scope, element = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player" layout = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout ngSrc '@ };
this = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px">
<div = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px ngSrc = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style = {
ngSrc: '@'
};
this.template = {
ngSrc: '@'
};
this.template = {
ngSrc: '@'
};
this.template = `<div = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column ngSrc '@ };
this = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column = {
ngSrc: '@'
};
this.template = `<div class="player ngSrc = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px = {
ngSrc: '@'
};
this.template = `<div class="player" layout = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column ngSrc '@ };
this};
this.template = `<div class="player" layout="column" layout = {
ngSrc: '@'
};
this.template = `<div class="player" layout = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center = {
ngSrc: '@'
};
this.template = `<div class="player" layout = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player" layout = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column ngSrc '@ };
this = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px">
<div id = {
ngSrc: '@'
};
this.template = `<div class="player ngSrc = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px">
<div id={{id}} class="flowplayer">
</div>
</div>`;
}
link(scope, element, attrs, ngModelController) {
scope.id = 'flow = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc '@ };
this = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column = {
ngSrc: '@'
};
this.template = `<div class="player ngSrc = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column = {
ngSrc '@ };
this = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px">
<div = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc = {
ngSrc: '@'
};
this.template = `<div class="player" layout = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player" layout = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px">
<div id={{id}} class ngSrc };
this = {
ngSrc: '@'
};
this.template = `<div = {
ngSrc: '@'
};
this.template = `<div class="player = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column = {
ngSrc: '@'
};
this.template = `<div class ngSrc = {
ngSrc: '@'
};
this.template = `<div class="player" layout="column" layout-align="center center" style="height:190px">
<div id={{id}} class="flowplayer">
</div>
</div>`;
}
link(scope, element, attrs, ngModelController) {
scope.id = 'flow-player-' + Math.floor(Math.random()*10000);
scope.init = function () {
flowplayer(scope.id, FlowPlayerPlay, {
clip: {
url:attrs.ngSrc ,
autoPlay: false,
autoBuffering: true
}
});
};
setTimeout(function(){
scope.init();
},0);
}
}