Is a way to opaqueToken sideDrawer in Angular2

Thread is closed for posting
3 posts, 0 answers
  1. Stéphane
    Stéphane avatar
    2 posts
    Member since:
    Mar 2017

    Posted 20 Mar 2017 Link to this post


    In Angular2 with the seed, I try to opaqueToken sideDrawer to share component between Web/Native.

    I have a TypeScript error with SideDrawerType, is a way to do it ?

    "SideDrawerType only refer to a type, but is being used as a value here"


    import { Page } from "ui/page";
    import { RadSideDrawer } from "nativescript-telerik-ui-pro/sidedrawer";
    import sideDrawerModule = require('nativescript-telerik-ui-pro/sidedrawer');
    import { RadSideDrawerComponent, SideDrawerType } from "nativescript-telerik-ui-pro/sidedrawer/angular";
    export const TOKEN_NATIVE: Array<any> = [
      { provide: PAGE, useClass: Page },
      { provide: RAD_SIDE_DRAWER, useClass: RadSideDrawer },
      { provide: SIDE_DRAWER_MODULE, useClass: sideDrawerModule },
      { provide: RAD_SIDE_DRAWER_COMPONENT, useClass: RadSideDrawerComponent },
      { provide: SIDE_DRAWER_TYPE, useClass: SideDrawerType }



  2. nikolay.tsonev
    nikolay.tsonev avatar
    343 posts

    Posted 22 Mar 2017 Link to this post

    Thank you for your interest in NativeScript and nativescript-telerik-ui-pro.

    UI for NativeScirpt plugin extends native components for iOS and Android and do not provide corresponding Web versions for the component. In this case, the SideDrawer should be used only for the NativeScirpt part.
    To do that you could try to integrate the component only in nativescript/src folder as the author of the plugin has suggested here.

    However, the given info and the attached code sample is not enough to provide some further suggestions.

    Bear in mind that angular-seed-advanced project has been created by one of our community members and has not been officially supported by the NativeScript team.
    The best solution is to contact again the author, which could provide some better suggestion for your case.

    Telerik by Progress
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
  3. Stéphane
    Stéphane avatar
    2 posts
    Member since:
    Mar 2017

    Posted 23 Mar 2017 in reply to nikolay.tsonev Link to this post

    Thanks you
Back to Top