This is a migrated thread and some comments may be shown as answers.

Is a way to opaqueToken sideDrawer in Angular2

2 Answers 37 Views
SideDrawer
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stéphane
Top achievements
Rank 1
Stéphane asked on 20 Mar 2017, 10:08 AM

Hi,

In Angular2 with the seed https://github.com/NathanWalker/angular-seed-advanced, 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, RAD_SIDE_DRAWER, SIDE_DRAWER_MODULE, RAD_SIDE_DRAWER_COMPONENT, SIDE_DRAWER_TYPE} from './tokens-shared';
 
 
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 }
     
];

 

Regards

2 Answers, 1 is accepted

Sort by
0
Nikolay Tsonev
Telerik team
answered on 22 Mar 2017, 02:40 PM
Hi,
Thank you for your interest in NativeScript and ---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 /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.

Regards,
nikolay.tsonev
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.
0
Stéphane
Top achievements
Rank 1
answered on 23 Mar 2017, 08:10 AM
Thanks you
Tags
SideDrawer
Asked by
Stéphane
Top achievements
Rank 1
Answers by
Nikolay Tsonev
Telerik team
Stéphane
Top achievements
Rank 1
Share this question
or