Skip to content

Commit 80af09d

Browse files
committedAug 14, 2024·
update in the router
1 parent c88b180 commit 80af09d

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed
 

‎Logic/Home.js

-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
11
console.log("logic file of home js")
2-
const increaseBtn = document.getElementById("increaseBtn")
3-
let count = 0
4-
const countDiv = document.getElementById("counter")
5-
increaseBtn.addEventListener('click',()=>{
6-
count++;
7-
countDiv.innerText = count;
8-
})

‎package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎scripts/compile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ pageFileNames.forEach(file => {
138138
} else {
139139
appendRouterWithNavigate_WithoutScript(file);
140140
}
141-
routesObj = routesObj + `,"/${file.toLowerCase()}":${file}Data,"${file}":${file}Data`
141+
routesObj = routesObj + `,"/${file.toLowerCase()}":${file}Data,"/${file}":${file}Data`
142142
routes.push(`/${file.toLowerCase()}`)
143143
});
144144

‎scripts/router.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function Home()
4747
};
4848

4949

50-
var routes = {"":HomeData,"/contact":ContactData,"Contact":ContactData,"/home":HomeData,"Home":HomeData};
50+
var routes = {"":HomeData,"/contact":ContactData,"/Contact":ContactData,"/home":HomeData,"/Home":HomeData};
5151
if(window.location.pathname in routes == true)
5252
{
5353
dom.innerHTML = routes[window.location.pathname];

0 commit comments

Comments
 (0)
Please sign in to comment.