Javascript 将纯角度转换为ecma6加角度
我想用eccma脚本代码构建动态控制器。我将用angular代码展示一个示例。但我不明白如何在eccma6中实现这一点Javascript 将纯角度转换为ecma6加角度,javascript,angularjs-directive,angularjs-scope,ecmascript-6,angular-controller,Javascript,Angularjs Directive,Angularjs Scope,Ecmascript 6,Angular Controller,我想用eccma脚本代码构建动态控制器。我将用angular代码展示一个示例。但我不明白如何在eccma6中实现这一点 let module = 'app.core.checka'; class WindowViewer{ constructor() { this.restrict = 'E'; this.template = ` < Button ng - click = "sendMsg()" > 85855 < /
let module = 'app.core.checka';
class WindowViewer{
constructor() {
this.restrict = 'E';
this.template = ` < Button ng - click = "sendMsg()" > 85855 < /Button><div ng-model="ngModel" kendo-window="windowId" k-title="'AJAX content'"
k - width = "'90%'" k - height = "'90%'" k - visible = "false" k - draggable = "false"
k - max - height = "'100%'" k - max - width = "'100%'" k - position = "{top: '10px', bottom: '100px', left: '5%', right: '5%'}"
k - position - left = "'5%'"
k - pinned = "true" k - actions = '[ "Minimize", "Maximize" ,"Close", "Refresh"]'
k - content = "{url: '{{ content }}' }"
k - on - open = "win2visible = true" k - on - close = "win2visible = false" > < /div>`;
this.controller = '@';
this.name = 'controllerName';
this.scope = {
ngModel: '=',
content: '=',
windowId: '=',
minimize: '=',
}
}
link(scope, elm, attrs, ctrl) {
console.log(scope);
if (angular.isDefined(scope.ratio)) {
let ratio = scope.ratio.split(':');
scope.offset = ratio[0];
scope.inputWidth = ratio[1];
}
}
static directiveFactory() {
WindowViewer.instance = new WindowViewer();
return WindowViewer.instance;
}
static callMe(){
alert(884855);
}
}
angular.module(module, [])
.directive('windowViewer', WindowViewer.directiveFactory);
export default module;
let模块='app.core.checka';
类WindowViewer{
构造函数(){
this.restrict='E';
this.template=`