Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/436.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何从angular$scope更新剑道编辑器_Javascript_Angularjs_Kendo Ui - Fatal编程技术网

Javascript 如何从angular$scope更新剑道编辑器

Javascript 如何从angular$scope更新剑道编辑器,javascript,angularjs,kendo-ui,Javascript,Angularjs,Kendo Ui,我有以下代码 html 我已经创建了一个dojo,可以相应地复制你的应用程序。并创建了一个按钮来更改控制器中的html angular.module('SplashApp', ['kendo.directives', 'ngSanitize']) .controller("MainController", function ($scope) { $scope.html = "<h1>Kenessssdo Editor</h1>\

我有以下代码

html


我已经创建了一个dojo,可以相应地复制你的应用程序。并创建了一个按钮来更改控制器中的html

 angular.module('SplashApp', ['kendo.directives', 'ngSanitize'])
        .controller("MainController", function ($scope) {
            $scope.html = "<h1>Kenessssdo Editor</h1>\n\n" +
              "<p>Note that 'change' is triggered when the editor loses focus.\n" +
                  "<br /> That's when the Angular scope gets updated.</p>";
                $scope.addHtml = function(){
                                    $scope.html+= "<br>ahahahahhahah";
            };
    });

一切都很好。您的语法正确吗?

您的Dojo很棒-谢谢。我在Telerik上使用了这个示例,不同之处在于它们显示为正确的语法。您的示例添加了ng model=html。当我补充说它工作正常。非常感谢。很高兴我能帮忙-