All Questions
Tagged with routes javascript
2,615
questions
-3
votes
0
answers
24
views
Refused to execute script because its MIME type error [closed]
I'm trying to link a javascript file to a html file that is being render by my server at the route '/'. However when the html file is loaded in the browser I get the following error:
I tried using ...
-1
votes
0
answers
25
views
while using mongodb with express, delete route is not working? [closed]
I am using Mongodb with express and creating a simple chat program . while creating a delete route i am not able to render a form to confirm password and it didn't even response console.log(id);
// ...
1
vote
1
answer
37
views
How to send data from multiple screen to one single screen in React native
i have basically four screens and i am sending the data to other
screen. for example i am sending the data from Home to ListScreen with
some items from flatlist then i am also sending the other data ...
0
votes
1
answer
45
views
2 PUT api request in same file in NEXT js
I need advice how to solve when I need for one route 2x PUT request. I need to add and remove two kinds of inputs, but I can remove one or the other. I can't figure out a way to set route.js to be ...
1
vote
1
answer
54
views
How to make protected route work in node.js
I'm working on a MEAN stack application. Where the user logs in using google oauth so i created a google oauth middleware as a function and linked it in server.js like
app.use('/protected',...
0
votes
1
answer
27
views
Issue with 'this' variable inside route.js when more than 1 steps are executed
I have a function inside route.js that takes parameter values from feature file and append the api url.
Problem is I have more than 1 entries in 'Example' table in feature file, so the steps are ...
1
vote
1
answer
32
views
Updated total price when buy button is clicked in react.js
I have created a multi-page web application with products avaliable to purchase - as specificed is the task brief. However my Buy button doesn't work as it doesn't store the price of the product to be ...
0
votes
0
answers
8
views
Application not rendering private routes [duplicate]
This are the routes in my App.jsx:
I added the /* after I received You rendered descendant (or called useRoutes()) at "/home" (under ) but the parent route path has no trailing "*"...
0
votes
1
answer
48
views
How to show index.html on every request in vanilla JavaScript
I'm working on a project using vanilla JavaScript. I want to build a spa(single page application) router.
If you visit the pages by clicking on one of links, the screen is not re-rendered. But if you ...
0
votes
0
answers
39
views
`router.push` not working in Next.js when clicking on submit
I'm working on a registration form in Next.js and I'm trying to redirect the user to an OTP verification page after successful registration. However, the router.push is not working as expected when ...
0
votes
0
answers
37
views
Why is this caching of an .ejs file not working?
app.get('/', (req, res) => {
if(myCache.has('/')){
console.log('Getting it from cache....')
return res.send(myCache.get('/'))
}else{
let htmlStr = '';
res....
0
votes
2
answers
298
views
Nextjs: import alias not working in route group
I am experimenting with route groups and nested layout files when every import using "@" threw module-not-found
jsconfig.json:
{
"compilerOptions": {
"baseUrl": &...
0
votes
1
answer
49
views
RouterView is not working in the vue project
I am working on a vue-project. I am having a Home page on which I had a sideBar component and a routerView component.
It looks like this
On clicking any item of the sidebar, the router pushes to a ...
0
votes
0
answers
25
views
What is the correct way to link to the internal pages of static built application?
What is the accepted way to link to an internal page of a Static Built, Single Page Application (SPA), from outside the application.
Lets say you have a Next.js static build hosted at example.com/path/...
0
votes
1
answer
25
views
logic error in my routing function in node js
so I have a pretty common function for routing in my node project. But I'm dealing with a logic error I can't wrap my head around. As you see I want to render my HTML server side but when I create and ...