Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { installRouter } from '../node_modules/pwa-helpers/router.js';
- installRouter(
- location => {
- const pages = document.getElementById("main").children
- for( let i=0; i< pages.length; i++){
- if("/" + pages[i].localName == location.pathname){
- pages[i].setAttribute("active",true)
- }else{
- pages[i].removeAttribute("active")
- }
- }
- }
- );
Add Comment
Please, Sign In to add comment