Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.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
processing.js angularjs视图内为空_Angularjs_Processing - Fatal编程技术网

processing.js angularjs视图内为空

processing.js angularjs视图内为空,angularjs,processing,Angularjs,Processing,我试图在angularjs视图中包含一个处理画布。它在index.html中工作,但在视图中不工作。下面给出了示例 Home.html Index.html ng视图是来自ngRoute的指令。您应该做的是只包含您的模板: <div ng-include="Home.html"></div> 如果要使用ng view,必须设置应用程序才能使用 将其添加到main.js var mainApp=angular.module(“mainApp”,“ngRoute]”)

我试图在angularjs视图中包含一个处理画布。它在index.html中工作,但在视图中不工作。下面给出了示例

Home.html
Index.html

ng视图是来自ngRoute的指令。您应该做的是只包含您的模板:

<div ng-include="Home.html"></div>

如果要使用
ng view
,必须设置应用程序才能使用


将其添加到main.js var mainApp=angular.module(“mainApp”,“ngRoute]”)中;mainApp.config(函数($routeProvider){$routeProvider.when('/home',{templateUrl:'home.html',controller:'StudentController'})不起作用。忘记粘贴代码。谢谢你的帮助。不用担心。如果你以后能提供plunker,我们可以在那里修复它,并给你一个工作答案。添加了示例代码。再次感谢你的plunker。我知道你的问题,但它似乎是特定于angulajs使用canvas的,这不在我的经验范围之内我希望这会有帮助。
<div ng-include="Home.html"></div>