我一直在尝试跟随这里的视频:http ://www.telerik.com/videos/platform/building-mobile-apps-using-telerik-platform---part-i
根据教程,从待办事项页面(即主页),当我单击抽屉图标/按钮时,抽屉页面应该会显示出来。
但是,我的抽屉无法打开 - 在 Chrome 调试器中,当我单击抽屉图标时,我不断收到此错误:“未捕获的类型错误:无法读取未定义的属性 'openFor'”。有什么帮助吗?
我正在使用浏览器内客户端。
新待办事项的弹出/模式也发生了同样的事情。
我的 todos.html 代码如下:
<div data-role="view" id="todos" data-model="APP.todos.model" data-init="APP.todos.events.init" data-after-show="APP.todos.events.afterShow">
<header data-role="header">
<div data-role="navbar">
<a data-role="button" data-rel="drawer" href="#categories" data-icon="drawer-button" data-align="left"></a>
<span data-role="view-title"></span>
<a data-role="button" data-rel="modalview" href="#newTodo" data-align="right" data-icon="compose"></a>
</div>
</header>
<ul data-role="listview" data-style="inset" data-bind="source: todos" data-template="todos-template" data-pull-to-refresh="true"></ul>
</div>
<script type="text/x-kendo-template" id="todos-template">
#: title #<a class="todo-close" data-bind="click: removeTodo"><i class="fa fa-check-square-o fa-lg"></i></a>
</script>
categories.html 的代码:
<div data-role="drawer" id="categories" style="width: 270px" data-model="APP.categories.model" data-before-show="APP.categories.events.beforeShow" data-views="['todos']" class="">
<div class="km-group-title">Categories</div>
<ul data-role="listview" data-bind="source: categories" data-template="categories-template"></ul>
<a data-role="button" data-icon="compose" class="full" data-rel="modalview" href="#newCategory">New</a>
</div>
<script type="text/x-kendo-template" id="categories-template">
<a data-bind="click: onCategorySelect">#: name #</a>
</script>