Hi John,
We have created Webpack sample using our JavaScript components with reference of
Angular 2 Webpack official link. And we have attached sample for Accordion component, please refer to the below link for sample.
Steps to render Syncfusion JavaScript Angular 2 component
- Copy the Angular 2 component file(s) of our JavaScript component from the below build (Essential Studio 2016 Volume 3) installed location and paste it into src/ej/ folder in the attached sample.
(Installed Location)\Syncfusion\Essential Studio\14.3.0.49\JavaScript\assets-src\angular2\
|
- Import the component in src/app/app.module.ts file as like the below code example.
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import {EJ_ACCORDION_COMPONENTS} from './ej/accordion.component';
import { AppComponent } from './app.component';
@NgModule({
imports: [
BrowserModule
],
declarations: [
AppComponent, EJ_ACCORDION_COMPONENTS
],
bootstrap: [ AppComponent ]
})
export class AppModule { } |
- Now, we can use the src/app/app.component.ts and src/app/app.component.html files to render our Angular 2 JavaScript components.
- Run the below commands to run the sample.
- Browse to
http://localhost: 8181 to see the application. You can make changes in the code found under
src folder and the browser should auto-refresh itself while you save files.
We implemented Angular 2 sample browser using our Essential Studio for JavaScript controls. Please refer to the below link for online demo.
Please let us know if you need further assistance.
Regards,
Abinaya S