{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSJsRoutingBundle/issues/179","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSJsRoutingBundle/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSJsRoutingBundle/issues/179/comments","events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSJsRoutingBundle/issues/179/events","html_url":"https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/issues/179","id":54340225,"number":179,"title":"Including js files in php","user":{"login":"jpintor14","id":10533447,"avatar_url":"https://avatars.githubusercontent.com/u/10533447?v=3","gravatar_id":"","url":"https://api.github.com/users/jpintor14","html_url":"https://github.com/jpintor14","followers_url":"https://api.github.com/users/jpintor14/followers","following_url":"https://api.github.com/users/jpintor14/following{/other_user}","gists_url":"https://api.github.com/users/jpintor14/gists{/gist_id}","starred_url":"https://api.github.com/users/jpintor14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpintor14/subscriptions","organizations_url":"https://api.github.com/users/jpintor14/orgs","repos_url":"https://api.github.com/users/jpintor14/repos","events_url":"https://api.github.com/users/jpintor14/events{/privacy}","received_events_url":"https://api.github.com/users/jpintor14/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-01-14T16:10:21Z","updated_at":"2015-01-15T17:03:22Z","closed_at":null,"body":"I'm trying to include the js files in php.\r\nThe documentation explains this  two lines in Twig:\r\n\r\n```\r\n<script src=\"{{ asset('bundles/fosjsrouting/js/router.js') }}\"></script>\r\n<script src=\"{{ path('fos_js_routing_js', {\"callback\": \"fos.Router.setData\"}) }}\"></script>\r\n```\r\n\r\nBut, how I write this in php? \r\nI added the router.js file:\r\n```\r\n<script src=\"/js/router.js\"></script>\r\n```\r\nExecuted the command:\r\n```\r\nphp app/console fos:js-routing:dump\r\n```\r\nFinally, included the generated js file:\r\n```\r\n<script src=\"/js/fos_js_routes.js\"></script>\r\n```\r\nThe console says:\r\n```\r\nUncaught ReferenceError: goog is not defined\r\nUncaught ReferenceError: fos is not defined\r\n```\r\n\r\nAny idea about the error?\r\n\r\n\r\nThanks a lot for your time!"},"comment":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSJsRoutingBundle/issues/comments/70119910","html_url":"https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/issues/179#issuecomment-70119910","issue_url":"https://api.github.com/repos/FriendsOfSymfony/FOSJsRoutingBundle/issues/179","id":70119910,"user":{"login":"stof","id":439401,"avatar_url":"https://avatars.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T17:03:22Z","updated_at":"2015-01-15T17:03:22Z","body":"The router.js file is **not** at the path ``/js/router.js``. If you look at your console, you will see that you have a 404 for this asset before the reference errors. this is why I linked you to the doc about referencing assets in templates"}}