{"action":"opened","issue":{"url":"https://api.github.com/repos/yeoman/yo/issues/324","labels_url":"https://api.github.com/repos/yeoman/yo/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/yeoman/yo/issues/324/comments","events_url":"https://api.github.com/repos/yeoman/yo/issues/324/events","html_url":"https://github.com/yeoman/yo/issues/324","id":72858209,"number":324,"title":"Static files accessed incorrectly","user":{"login":"smithjessk","id":5957838,"avatar_url":"https://avatars.githubusercontent.com/u/5957838?v=3","gravatar_id":"","url":"https://api.github.com/users/smithjessk","html_url":"https://github.com/smithjessk","followers_url":"https://api.github.com/users/smithjessk/followers","following_url":"https://api.github.com/users/smithjessk/following{/other_user}","gists_url":"https://api.github.com/users/smithjessk/gists{/gist_id}","starred_url":"https://api.github.com/users/smithjessk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smithjessk/subscriptions","organizations_url":"https://api.github.com/users/smithjessk/orgs","repos_url":"https://api.github.com/users/smithjessk/repos","events_url":"https://api.github.com/users/smithjessk/events{/privacy}","received_events_url":"https://api.github.com/users/smithjessk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-03T20:10:30Z","updated_at":"2015-05-03T20:10:30Z","closed_at":null,"body":"In my MEAN app, I have two routes, `/:room` and `/:room/manage`. Both of these routes serve an HTML template that accesses static files. However, `/:room/manage`, returns a 404 when it tries to grab these files. For instance, with `:room = 0`, it tries to access `/0/lib/bootstrap/...` instead of `/lib/bootstrap/...`.\r\n\r\nThis is because there is no leading slash in the generated `layout.server.view.html`. That is, the problem was fixed for me by changing \r\n\r\n```\r\n{% for cssFile in cssFiles %}<link rel=\"stylesheet\" href=\"{{cssFile}}\">{% endfor %}\r\n```\r\n\r\nto \r\n\r\n```\r\n{% for cssFile in cssFiles %}<link rel=\"stylesheet\" href=\"/{{cssFile}}\">{% endfor %}\r\n```\r\n\r\nHope this helps."}}