This is the index.html file. By default, this page is rendered initially. Then I want to navigate to other pages. But that's not happening.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Home | Routing</title>
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="./bower_components/app-router/app-router.html" />
<link
rel="import"
href="./bower_components/pushstate-anchor/pushstate-anchor.html"
/>
</head>
<body>
<a is="pushstate-anchor" href="/student">student</a>
<a is="pushstate-anchor" href="/teacher">teacher</a>
<a is="pushstate-anchor" href="/example">example</a>
<dom-bind>
<template>
<app-router>
<app-route path="/" import="/pages/home-element.html"></app-route>
<app-route
path="/student"
import="/pages/student-element.html"
></app-route>
-->
<app-route
path="/teacher"
import="/pages/teacher-element.html"
></app-route>
<app-route path="/example">
<template>
<p>Inline template FTW!</p>
</template>
</app-route>
<app-route path="*" import="./PageNotFound.html"></app-route>
</app-router>
</template>
</dom-bind>
</body>
</html>
I am trying to perform routing but it's not working. I tried using both anchor tag for URL and manual URL entering to check whether routing happens or not. But in either case, it's not working
I am not able to perform routing using app-router. But I found a solution using
more-routing.Include dependencies
Body of index.html file
By using this approach, I performed routing in [email protected]