Angular2 RouterLink not working in AppBuilder

2 posts, 0 answers
  1. Enterprise
    Enterprise avatar
    1 posts
    Member since:
    Feb 2016

    Posted 13 Jun Link to this post

    I am running an Angular2 app with routing, using the routerLink.
    The code below works great in the browser.

      selector: 'my-app',
      directives: [ROUTER_DIRECTIVES]
      template: `
        <div class="app">
          Hello world!
                <a [routerLink]=" ['Home'] ">Home</a>
                <a [routerLink]=" ['Login'] ">Login</a>

    However, when I run the same code on the Telerik AppBuilder platform for Android, it fails.
    It appears that the router link is resolving to something like: "file:///views/login.html"

    However, it appears that AppBuilder is expecting a path something more like: 
    I say this because that is what the path for my index.html file looks like.

    Is the Angular2 routerLink not supporeted in Telerik AppBuilder?
    How do I get this to work?


  2. Tsvetina
    Tsvetina avatar
    1863 posts

    Posted 16 Jun Link to this post

    Hello Enterprise,

    Angular 2 support hasn't been introduced in AppBuilder, yet. However, if you are interested in such a concept, NativeScript offers Angular 2 support and you can take a look at this step by step tutorial for building a native mobile app using NativeScript and Angular 2:
    Building Apps with NativeScript and Angular 2


    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

Back to Top