JS Applications
Здравейте,
След като следвам неотлъчно кода на трейнъра от видеото exam preparation https://softuni.bg/trainings/2840/js-applications-june-2020/internal#lesson-15454 и стигна до момента в който трябва да рутирам чрез код:
const app = Sammy("body", function () {
this.use("Handlebars", "hbs");
this.get('#/home', function(ctx){
ctx.loadPartials(commonPartial).partial('./view/home.hbs')
});
this.get('#/login', function(ctx){
ctx.loadPartials(commonPartial).partial('./view/user/login.hbs')
});
this.get('#/profile', function(ctx){
ctx.loadPartials(commonPartial).partial('./view/user/profile.hbs')
});
this.get('#/register', function(ctx){
ctx.loadPartials(commonPartial).partial('./view/user/register.hbs')
});
const commonPartial={
header: './view/common/header.hbs',
footer: './view/common/footer.hbs'
}
});
app.run('#/home');
в браузъра няма никакъв ефект и получавам грешка
[Sat Nov 28 2020 12:01:33 GMT+0200 (Източноевропейско стандартно време)] body 404 Not Found get /#login Error: 404 Not Found get /#login at Sammy.Application.error (sammy-0.7.6.min.js:5) at Sammy.Application.notFound (sammy-0.7.6.min.js:5) at Sammy.Application.runRoute (sammy-0.7.6.min.js:5) at Sammy.Application._checkLocation (sammy-0.7.6.min.js:5) at context_prototype.<anonymous> (sammy-0.7.6.min.js:5) at HTMLBodyElement.listener_callback (sammy-0.7.6.min.js:5) at HTMLBodyElement.dispatch (jquery.js:5429) at HTMLBodyElement.elemData.handle (jquery.js:5233) at Object.trigger (jquery.js:8715) at HTMLBodyElement.<anonymous> (jquery.js:8793)
Моля за помощ!