{"action":"created","issue":{"url":"https://api.github.com/repos/nolimits4web/Framework7/issues/365","repository_url":"https://api.github.com/repos/nolimits4web/Framework7","labels_url":"https://api.github.com/repos/nolimits4web/Framework7/issues/365/labels{/name}","comments_url":"https://api.github.com/repos/nolimits4web/Framework7/issues/365/comments","events_url":"https://api.github.com/repos/nolimits4web/Framework7/issues/365/events","html_url":"https://github.com/nolimits4web/Framework7/issues/365","id":55077813,"number":365,"title":"Cannot set initial url for main-view","user":{"login":"PiJoules","id":6019989,"avatar_url":"https://avatars.githubusercontent.com/u/6019989?v=3","gravatar_id":"","url":"https://api.github.com/users/PiJoules","html_url":"https://github.com/PiJoules","followers_url":"https://api.github.com/users/PiJoules/followers","following_url":"https://api.github.com/users/PiJoules/following{/other_user}","gists_url":"https://api.github.com/users/PiJoules/gists{/gist_id}","starred_url":"https://api.github.com/users/PiJoules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PiJoules/subscriptions","organizations_url":"https://api.github.com/users/PiJoules/orgs","repos_url":"https://api.github.com/users/PiJoules/repos","events_url":"https://api.github.com/users/PiJoules/events{/privacy}","received_events_url":"https://api.github.com/users/PiJoules/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-21T21:13:11Z","updated_at":"2016-06-12T05:18:05Z","closed_at":"2015-01-28T12:19:42Z","body":"For the app I'm making, when the user first enters the app, the default home page is loaded (let's call it `index.html`). After the user signs in, they are routed to another page of the app (let's call this `feed.html`).\r\n\r\nWhen the user leaves the app and decides to come back later, but is still logged into the app, I want the user to automatically see `feed.html` when the app loads, rather than `index.html`. I use `localStorage` to keep track of whether or not the user is logged in. My problem is trying to get `feed.html` to load instead of `index.html`. I have tried passing a `url` parameter when adding the main view to the app, though it does not seem to redirect the page.\r\n\r\nIs there any way I can do this? I have tried changing the default url dynamically and in the html as indicated [here](http://www.idangero.us/framework7/docs/views.html#default-view-url), but `index.html` keeps loading instead of `feed.html`.\r\n\r\nThis is the code I was using:\r\n```js\r\nvar mainView;\r\nif (localStorage.getItem(\"isLoggedIn\") !== null){\r\n    // If already logged in\r\n    mainView = myApp.addView(\".view-main\", {\r\n        url: \"feed.html\"\r\n    });\r\n}\r\nelse {\r\n    mainView = myApp.addView(\".view-main\", {});\r\n}\r\n```\r\n\r\nBefore this, I would forward the user to `feed.html` after `index.html` loads using the router:\r\n```js\r\nmainView.router.load({\r\n    url: \"feed.html\"\r\n});\r\n```\r\nbut I would rather have the user land on `feed.html` instead of `index.html` if possible, since UX-wise, it would seem odd if the user is logged in, yet has to see the original screen where they originally logged in.\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/nolimits4web/Framework7/issues/comments/225410775","html_url":"https://github.com/nolimits4web/Framework7/issues/365#issuecomment-225410775","issue_url":"https://api.github.com/repos/nolimits4web/Framework7/issues/365","id":225410775,"user":{"login":"zanurano","id":15259187,"avatar_url":"https://avatars.githubusercontent.com/u/15259187?v=3","gravatar_id":"","url":"https://api.github.com/users/zanurano","html_url":"https://github.com/zanurano","followers_url":"https://api.github.com/users/zanurano/followers","following_url":"https://api.github.com/users/zanurano/following{/other_user}","gists_url":"https://api.github.com/users/zanurano/gists{/gist_id}","starred_url":"https://api.github.com/users/zanurano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanurano/subscriptions","organizations_url":"https://api.github.com/users/zanurano/orgs","repos_url":"https://api.github.com/users/zanurano/repos","events_url":"https://api.github.com/users/zanurano/events{/privacy}","received_events_url":"https://api.github.com/users/zanurano/received_events","type":"User","site_admin":false},"created_at":"2016-06-12T05:18:05Z","updated_at":"2016-06-12T05:18:05Z","body":"mainView.router.load({\r\n    url: \"feed.html\",\r\n reload: true\r\n});"}}
{"actor":{"display_login":"zanurano"}}