gpt4 book ai didi

html - Polymer 1.0 Cordova,我该怎么做才能改变主页的方向?

转载 作者:太空宇宙 更新时间:2023-11-04 10:51:18 25 4
gpt4 key购买 nike

每当我启动应用程序时,总是以地址开头:http://127.0.0.1:49218/www/index.html#!/www/index.html ,但我想从地址开始:http://127.0.0.1:49218/www/index.html#!/home ,这是我的应用程序中的“home (Inicio)”部分。这是我的代码:

<!DOCTYPE html>
<html>

<head>
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
<link rel="stylesheet" href="css/style.css">
<link rel="import" href="bower_components/polymer/polymer.html">
<link rel="import" href="bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html">
<link rel="import" href="bower_components/paper-toolbar/paper-toolbar.html">
<link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="bower_components/iron-icons/iron-icons.html">
<link rel="import" href="bower_components/iron-icon/iron-icon.html">
<link rel="import" href="bower_components/paper-drawer-panel/paper-drawer-panel.html">
<link rel="import" href="bower_components/paper-menu/paper-menu.html">
<link rel="import" href="bower_components/paper-styles/paper-styles.html">
<link rel="import" href="bower_components/paper-styles/typography.html">
<link rel="import" href="bower_components/pushstate-anchor/pushstate-anchor.html">
<link rel="import" href="bower_components/iron-pages/iron-pages.html">
<link rel="import" href="bower_components/neon-animation/neon-animated-pages.html">
<link rel="import" href="bower_components/neon-animation/neon-animations.html">
<link rel="import" href="catalogo-component/catalogo-component.html">
<link rel="import" href="home-component/home-component.html">
<link rel="import" href="promociones-component/promociones-component.html">
<link rel="import" href="contacto-component/contacto-component.html">
<link rel="import" href="about-component/about-component.html">
<link rel="import" href="elements/routing.html">
<link rel="import" href="css/app-theme.html">
<style is="custom-style" include="app-theme.html"></style>
<title>Reino Unido</title>
</head>

<body unresolved>
<span id="browser-sync-binding"></span>
<template is="dom-bind" id="app">
<paper-drawer-panel>
<paper-scroll-header-panel drawer fixed>
<div drawer class="menu">
<paper-toolbar class="drawer">
<span>Reino Unido</span>
</paper-toolbar>
<paper-menu attr-for-selected="data-route" selected="[[route]]">
<a data-route="home" href="/home">
<iron-icon icon="home"></iron-icon><span class="Menu">Inicio</span></a>
<a data-route="catalogo" href="/catalogo">
<iron-icon icon="shopping-cart"></iron-icon><span class="Menu">Catálogo</span></a>
<a data-route="promociones" href="/promociones">
<iron-icon icon="star"></iron-icon><span class="Menu">Promociones</span></a>
<a data-route="contacto" href="/contacto">
<iron-icon icon="drafts"></iron-icon><span class="Menu">Contáctanos</span></a>
<a data-route="about" href="/about">
<iron-icon icon="info"></iron-icon><span class="Menu">Acerca de</span></a>
</paper-menu>
</div>
</paper-scroll-header-panel>
<paper-scroll-header-panel main id="headerPanelMain" condenses keep-condensed-header>
<div main class="page">
<paper-toolbar class="main">
<paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
<span title class="flex">Inicio</span>
<paper-icon-button icon="refresh"></paper-icon-button>
</paper-toolbar>
<neon-animated-pages attr-for-selected="data-route" selected="{{route}}" class="secciones" entry-animation="slide-from-right-animation" exit-animation="slide-left-animation">
<section data-route="home">
<home-component></home-component>
</section>

<section data-route="catalogo">
<catalogo-component></catalogo-component>
</section>

<section data-route="promociones">
<promociones-component></promociones-component>
</section>

<section data-route="contacto">
<contacto-component></contacto-component>
</section>

<section data-route="about">
<about-component></about-component>
</section>
</neon-animated-pages>
</div>
</paper-scroll-header-panel>
</paper-drawer-panel>
</template>
</body>

</html>

这是应用程序的屏幕截图:

enter image description here

最佳答案

尝试编辑 config.xml 中的内容标签。它可能看起来像这样:

<content src="index.html" />

只需更改 src 值,使其符合您的需要。

关于html - Polymer 1.0 Cordova,我该怎么做才能改变主页的方向?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34979783/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com