简体   繁体   English

Kendo UI Mobile中的远程查看html文件

[英]Remote view html files in Kendo UI Mobile

I have created an sample hybrid app using telerik app builder CLI. 我已经使用telerik应用构建器CLI创建了一个示例混合应用。 The project loads an initial home screen from a COMPONENTS folder in the project. 该项目从项目中的COMPONENTS文件夹加载初始主屏幕。 Now i have Home folder with an index.js and view.html in it and the Home folder is inside Components. 现在我有了带有index.js和view.html的Home文件夹,并且Home文件夹在Components内部。 I added About folder with an index.js and view.html in it. 我在其中添加了带有index.js和view.html的About文件夹。

Both view.html have a div inside it. 两个view.html内都有一个div。 Now i need to know how to navigate from home to about. 现在,我需要知道如何从家中导航。 This has to happen from the JS. 这必须在JS中进行。 I tried 我试过了

      var app = new kendo.mobile.Application();
      app.navigate("#AboutView");

"#AboutView" is the id of the div in view.html in About folder. “ #AboutView”是About文件夹中view.html中div的ID。 This doesn't work. 这行不通。 Could someone provide any help 有人可以提供任何帮助吗

with remote views ... you will need to provide the full path. 带有远程视图...您将需要提供完整路径。 and the reference is always from the root of the project. 引用始终来自项目的根源。 so in your case it will be 所以在你的情况下

components/About/view.html components / About / view.html

http://docs.telerik.com/kendo-ui/mobile/application#remote-views http://docs.telerik.com/kendo-ui/mobile/application#remote-views

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM