我是遵循德鲁帕加你好世界创造教程,然而,所有我试图使你好世界证明是不成功的。
以下是frontpage配置框架settings.js
我是在移动文件夹上安装的,设置文件是settings.js
// App Title
drupalgap.settings.title = 'gsam';
// App Front Page
drupalgap.settings.front = 'hello_world';模块名是具有目录结构的gsam:
mobile/app/modules/custom/gsam这是我的gsam.js
当我每次加载指向手机的服务器时,我都有404,这是在我放置了这段代码之后。
/**
* Implements hook_menu().
*/
function gsam_menu() {
var items = {};
items['hello_world'] = {
title: 'DrupalGap',
page_callback: 'gsam_hello_world_page'
};
return items;
}
/**
* The callback for the "Hello World" page.
*/
function gsam_hello_world_page() {
var content = {};
content['my_button'] = {
theme: 'button',
text: 'Hello World',
attributes: {
onclick: "drupalgap_alert('Hi!')"
}
};
return content;
}发布于 2016-10-18 17:01:17
一个可能的原因可能是显然未能在项目settings.js中引用自定义模块。该文件位于移动/app/模块/定制/gsam/www/app中。编辑该文件并在自定义模块部分中添加以下代码:
Drupal.modules.custom['gsam'] = {};
drupalgap.settings.front = 'hello_world';https://drupal.stackexchange.com/questions/191495
复制相似问题