Nativescript 5 : how to navigate from a root tab component totally and goes to an other one?











up vote
0
down vote

favorite












i have a project like this one:
a project with this structure :



-app.component.ts (root tab)
---home.module
--------home tab (outlet)
--------categories tab (outlet)
--------etc.. (outlet)
---login.module(lazy loaded)
---ex.module (lazy loaded)


this is my app-routing module:



const routes: Routes = [
{ path: "", redirectTo: "/home/(homeTab:home//categoriesTab:categories//infoTab:info//locationsTab:locations//accountTab:account)", pathMatch: "full" },
{ path: "home", loadChildren: "./app/home/home.module#HomeModule" },
{ path: "login", loadChildren: "./app/login/login.module#LoginModule" },
{ path: "ex", loadChildren: "./app/ex/ex.module#ExModule" }
]


now i want to leave tab view totally and go to login module wich has its owen (non-tab) view from "home tab(outlet)"
i tried to navigate using routerExtension with parameter relative to activatedRoute.root but it doesn't works .



here is an exmple of the issue : https://play.nativescript.org/?template=play-ng&id=IyP222&v=11










share|improve this question
























  • You may directly navigate to login, it need not to be relative. If you still face issues, can you recreate the scenario with Playground?
    – Manoj
    Nov 17 at 15:56










  • @Manoj i have updated my question with a playground link .
    – Hamza AlQabali
    Nov 17 at 17:53















up vote
0
down vote

favorite












i have a project like this one:
a project with this structure :



-app.component.ts (root tab)
---home.module
--------home tab (outlet)
--------categories tab (outlet)
--------etc.. (outlet)
---login.module(lazy loaded)
---ex.module (lazy loaded)


this is my app-routing module:



const routes: Routes = [
{ path: "", redirectTo: "/home/(homeTab:home//categoriesTab:categories//infoTab:info//locationsTab:locations//accountTab:account)", pathMatch: "full" },
{ path: "home", loadChildren: "./app/home/home.module#HomeModule" },
{ path: "login", loadChildren: "./app/login/login.module#LoginModule" },
{ path: "ex", loadChildren: "./app/ex/ex.module#ExModule" }
]


now i want to leave tab view totally and go to login module wich has its owen (non-tab) view from "home tab(outlet)"
i tried to navigate using routerExtension with parameter relative to activatedRoute.root but it doesn't works .



here is an exmple of the issue : https://play.nativescript.org/?template=play-ng&id=IyP222&v=11










share|improve this question
























  • You may directly navigate to login, it need not to be relative. If you still face issues, can you recreate the scenario with Playground?
    – Manoj
    Nov 17 at 15:56










  • @Manoj i have updated my question with a playground link .
    – Hamza AlQabali
    Nov 17 at 17:53













up vote
0
down vote

favorite









up vote
0
down vote

favorite











i have a project like this one:
a project with this structure :



-app.component.ts (root tab)
---home.module
--------home tab (outlet)
--------categories tab (outlet)
--------etc.. (outlet)
---login.module(lazy loaded)
---ex.module (lazy loaded)


this is my app-routing module:



const routes: Routes = [
{ path: "", redirectTo: "/home/(homeTab:home//categoriesTab:categories//infoTab:info//locationsTab:locations//accountTab:account)", pathMatch: "full" },
{ path: "home", loadChildren: "./app/home/home.module#HomeModule" },
{ path: "login", loadChildren: "./app/login/login.module#LoginModule" },
{ path: "ex", loadChildren: "./app/ex/ex.module#ExModule" }
]


now i want to leave tab view totally and go to login module wich has its owen (non-tab) view from "home tab(outlet)"
i tried to navigate using routerExtension with parameter relative to activatedRoute.root but it doesn't works .



here is an exmple of the issue : https://play.nativescript.org/?template=play-ng&id=IyP222&v=11










share|improve this question















i have a project like this one:
a project with this structure :



-app.component.ts (root tab)
---home.module
--------home tab (outlet)
--------categories tab (outlet)
--------etc.. (outlet)
---login.module(lazy loaded)
---ex.module (lazy loaded)


this is my app-routing module:



const routes: Routes = [
{ path: "", redirectTo: "/home/(homeTab:home//categoriesTab:categories//infoTab:info//locationsTab:locations//accountTab:account)", pathMatch: "full" },
{ path: "home", loadChildren: "./app/home/home.module#HomeModule" },
{ path: "login", loadChildren: "./app/login/login.module#LoginModule" },
{ path: "ex", loadChildren: "./app/ex/ex.module#ExModule" }
]


now i want to leave tab view totally and go to login module wich has its owen (non-tab) view from "home tab(outlet)"
i tried to navigate using routerExtension with parameter relative to activatedRoute.root but it doesn't works .



here is an exmple of the issue : https://play.nativescript.org/?template=play-ng&id=IyP222&v=11







angular nativescript nativescript-angular






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 17 at 17:52

























asked Nov 17 at 15:05









Hamza AlQabali

3116




3116












  • You may directly navigate to login, it need not to be relative. If you still face issues, can you recreate the scenario with Playground?
    – Manoj
    Nov 17 at 15:56










  • @Manoj i have updated my question with a playground link .
    – Hamza AlQabali
    Nov 17 at 17:53


















  • You may directly navigate to login, it need not to be relative. If you still face issues, can you recreate the scenario with Playground?
    – Manoj
    Nov 17 at 15:56










  • @Manoj i have updated my question with a playground link .
    – Hamza AlQabali
    Nov 17 at 17:53
















You may directly navigate to login, it need not to be relative. If you still face issues, can you recreate the scenario with Playground?
– Manoj
Nov 17 at 15:56




You may directly navigate to login, it need not to be relative. If you still face issues, can you recreate the scenario with Playground?
– Manoj
Nov 17 at 15:56












@Manoj i have updated my question with a playground link .
– Hamza AlQabali
Nov 17 at 17:53




@Manoj i have updated my question with a playground link .
– Hamza AlQabali
Nov 17 at 17:53












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Looks like the given scenario still has issues to be addressed with latest version of nativescript-angular (v6.2.0). Refer the Github Issue where the team has provided working sample using latest @next version.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53352448%2fnativescript-5-how-to-navigate-from-a-root-tab-component-totally-and-goes-to-a%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Looks like the given scenario still has issues to be addressed with latest version of nativescript-angular (v6.2.0). Refer the Github Issue where the team has provided working sample using latest @next version.






    share|improve this answer

























      up vote
      0
      down vote













      Looks like the given scenario still has issues to be addressed with latest version of nativescript-angular (v6.2.0). Refer the Github Issue where the team has provided working sample using latest @next version.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Looks like the given scenario still has issues to be addressed with latest version of nativescript-angular (v6.2.0). Refer the Github Issue where the team has provided working sample using latest @next version.






        share|improve this answer












        Looks like the given scenario still has issues to be addressed with latest version of nativescript-angular (v6.2.0). Refer the Github Issue where the team has provided working sample using latest @next version.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 17 at 22:00









        Manoj

        2,6641916




        2,6641916






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53352448%2fnativescript-5-how-to-navigate-from-a-root-tab-component-totally-and-goes-to-a%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            Origin of the phrase “under your belt”?