{"action":"closed","issue":{"url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/2401","labels_url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/2401/labels{/name}","comments_url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/2401/comments","events_url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/2401/events","html_url":"https://github.com/marionettejs/backbone.marionette/issues/2401","id":60184167,"number":2401,"title":"accessing router options from the appRoutes callback","user":{"login":"newtonianb","id":2313644,"avatar_url":"https://avatars.githubusercontent.com/u/2313644?v=3","gravatar_id":"","url":"https://api.github.com/users/newtonianb","html_url":"https://github.com/newtonianb","followers_url":"https://api.github.com/users/newtonianb/followers","following_url":"https://api.github.com/users/newtonianb/following{/other_user}","gists_url":"https://api.github.com/users/newtonianb/gists{/gist_id}","starred_url":"https://api.github.com/users/newtonianb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newtonianb/subscriptions","organizations_url":"https://api.github.com/users/newtonianb/orgs","repos_url":"https://api.github.com/users/newtonianb/repos","events_url":"https://api.github.com/users/newtonianb/events{/privacy}","received_events_url":"https://api.github.com/users/newtonianb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/marionettejs/backbone.marionette/labels/debug%20request","name":"debug request","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-07T01:50:57Z","updated_at":"2015-03-07T02:51:20Z","closed_at":"2015-03-07T02:51:20Z","body":"I'm using Marionette.SubRouter which extends from Marionette.AppRouter. Marionette.SubRouter allows me to pass parameter object when instantiating the router. My issue is I'm trying to get ahold of that object from within my callback ``myPath``. Inside my ``appRoutes`` callback this refers to the API object. How can I do this?\r\n\r\n```\r\n(in a different module)\r\nnew App.MyApp.Router(\"prefix\", {myvar: 'test'})\r\n```\r\n\r\n```\r\nAPI =\r\n  myPath: ->\r\n   # debugger  # how can I access options here\r\nclass MyApp.Router extends Marionette.SubRouter\r\n  controller: API\r\n  initialize: (options) ->\r\n    { @myvar } = options\r\n  appRoutes:\r\n    \"my-path\" : \"myPath\"\r\n```"}}