{"action":"created","issue":{"url":"https://api.github.com/repos/OnsenUI/OnsenUI/issues/2084","repository_url":"https://api.github.com/repos/OnsenUI/OnsenUI","labels_url":"https://api.github.com/repos/OnsenUI/OnsenUI/issues/2084/labels{/name}","comments_url":"https://api.github.com/repos/OnsenUI/OnsenUI/issues/2084/comments","events_url":"https://api.github.com/repos/OnsenUI/OnsenUI/issues/2084/events","html_url":"https://github.com/OnsenUI/OnsenUI/issues/2084","id":237143555,"number":2084,"title":"Angular 1 | ons-navigator gives error when reloads the same page","user":{"login":"ceskomira90","id":17617144,"avatar_url":"https://avatars0.githubusercontent.com/u/17617144?v=3","gravatar_id":"","url":"https://api.github.com/users/ceskomira90","html_url":"https://github.com/ceskomira90","followers_url":"https://api.github.com/users/ceskomira90/followers","following_url":"https://api.github.com/users/ceskomira90/following{/other_user}","gists_url":"https://api.github.com/users/ceskomira90/gists{/gist_id}","starred_url":"https://api.github.com/users/ceskomira90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceskomira90/subscriptions","organizations_url":"https://api.github.com/users/ceskomira90/orgs","repos_url":"https://api.github.com/users/ceskomira90/repos","events_url":"https://api.github.com/users/ceskomira90/events{/privacy}","received_events_url":"https://api.github.com/users/ceskomira90/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-06-20T09:15:55Z","updated_at":"2017-06-20T13:53:54Z","closed_at":"2017-06-20T09:29:52Z","body":"I'm using the current version of onsen: 2.4.0.\r\nWhen i try to reload the same page, onsen give me always the same error  \"You must supply an 'ons-page' element to 'ons-navigator'\".\r\n\r\nMy navigator is declared in this way:\r\n```\r\n<ons-navigator var=\"menuNavLogin\" page=\"login.html\">\r\n    <ons-page ng-controller=\"loginController\">\r\n      ....\r\n    </ons-page>\r\n</ons-navigator>\r\n\r\n```\r\nThis error becomes when i try to reload the same page.\r\nFor example  when the login fails i want that the page of login is replaced by itself.\r\n\r\nin the controller the code is this:\r\n```\r\n menuNavLogin.replacePage('login.html');\r\n\r\n```\r\nI tried to use resetToPage and pushPage too but it gives me always the same error.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/OnsenUI/OnsenUI/issues/comments/309760576","html_url":"https://github.com/OnsenUI/OnsenUI/issues/2084#issuecomment-309760576","issue_url":"https://api.github.com/repos/OnsenUI/OnsenUI/issues/2084","id":309760576,"user":{"login":"ceskomira90","id":17617144,"avatar_url":"https://avatars0.githubusercontent.com/u/17617144?v=3","gravatar_id":"","url":"https://api.github.com/users/ceskomira90","html_url":"https://github.com/ceskomira90","followers_url":"https://api.github.com/users/ceskomira90/followers","following_url":"https://api.github.com/users/ceskomira90/following{/other_user}","gists_url":"https://api.github.com/users/ceskomira90/gists{/gist_id}","starred_url":"https://api.github.com/users/ceskomira90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceskomira90/subscriptions","organizations_url":"https://api.github.com/users/ceskomira90/orgs","repos_url":"https://api.github.com/users/ceskomira90/repos","events_url":"https://api.github.com/users/ceskomira90/events{/privacy}","received_events_url":"https://api.github.com/users/ceskomira90/received_events","type":"User","site_admin":false},"created_at":"2017-06-20T13:53:54Z","updated_at":"2017-06-20T13:53:54Z","body":"Yes i check it. I red all of yout tutorial (GREAT WORK). This issue is new with onsen 2.4.0. \r\nI want to reload a page after an ajax call:\r\ni have a `<tabbar>` and some pages called in the `<tab>` that have own specified navigator. \r\nI initialize the  **navigator** in the page that the `<tab>` calls. \r\n\r\n**index.html:**\r\n```\r\n<body ng-app=\"myApp\" >\r\n    <ons-tabbar>\r\n        <ons-tab label=\"Tab 1\" page=\"login.html\" active>\r\n        </ons-tab>\r\n    </ons-tabbar>\r\n\r\n   <ons-navigator var=\"menuNavLogin\" page=\"login.html\">\r\n    </ons-navigator>\r\n    <template id=\"no_login.html\">\r\n       .....\r\n   </template>\r\n</body>\r\n```\r\n\r\n\r\n\r\n**## A workaround that now fix the bug is this:**\r\n**index.html:**\r\n```\r\n<body ng-app=\"myApp\" >\r\n    <ons-tabbar>\r\n        <ons-tab label=\"Tab 1\" page=\"login.html\" active>\r\n        </ons-tab>\r\n    </ons-tabbar>\r\n</body>\r\n```\r\nThen i create a **login.html** page that is structured in this way:\r\n```\r\n<ons-page>\r\n    <ons-navigator var=\"menuNavLogin\" page=\"no_login.html\">\r\n    </ons-navigator>\r\n    <template id=\"no_login.html\">\r\n        </ons-page>\r\n    </template>\r\n</ons-page>\r\n```\r\nIn the controller i recall:\r\n` menuNavLogin.replacePage('login.html');\r\n`\r\n\r\nIn this way works, but I don't know if is the correct one.\r\n\r\nMy goal is to update the same **login.html** so if the call ajax goes fine, the page will display the data captured from the call.\r\n\r\n\r\n"}}
{"actor":{"display_login":"ceskomira90"}}