0
私は非常に簡単なルーティングを試みていますが、それを動作させることはできません。私のコード:それは常に404、ポリマーアプリの場所が動作しない
を示しているので
<link rel="import" href="../../bower_components/polymer/polymer-element.html">
<dom-module id="lab1-app">
<template>
<style>
:host {
display: block;
}
</style>
<app-location route="{{rt}}"></app-location>
<app-route
route="{{rt}}"
pattern="/:view"
data="{{rd}}"
tail="{{tail}}"
></app-route>
<iron-pages selected="[[rd.view]]" attr-for-selected="pgid" fallback-selection="404" >
<h2 pgid="profile">Profile</h2>
<h2 pgid="detail">Detail</h2>
<h2 pgid="form">Form</h2>
<h2 pgid="404">404</h2>
</iron-pages>
</template>
<script>
/**
* @customElement
* @polymer
*/
class Lab1App extends Polymer.Element {
static get is() { return 'lab1-app'; }
static get properties() {
// console.log(dataRute);
return {};
}
}
window.customElements.define(Lab1App.is, Lab1App);
</script>
</dom-module>
私が間違っているものを一部わからないんだけど、私は鉄のページを伝えることができますが働いているが、私はlocalhost:8081/detail
をロードしようとしたとき、それはまだ404を示し、何か助けていただければ幸いです。ありがとう!