|
angular-cli.json
{
"project": {
"name": "new-app"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css" // refer in the style.css globally
],
"scripts": [],
}
Styles.css
|
|
app.component.html
<ejs-accordion>
<e-accordionitems>
<e-accordionitem header='Toolbar' [content] ='content1'>
</e-accordionitem>
<e-accordionitem header='Treeview' [content] ='content2'>
</e-accordionitem>
<e-accordionitem header='Tab' [content] ='content3'>
</e-accordionitem>
</e-accordionitems>
</ejs-accordion>
<ng-template #content1 let-data>
<ejs-toolbar>
<e-items>
<e-item text='Cut'></e-item>
<e-item text='Copy'></e-item>
<e-item text='Paste'></e-item>
<e-item type='Separator'></e-item>
<e-item text='Bold'></e-item>
<e-item text='Italic'></e-item>
<e-item text='Underline'></e-item>
</e-items>
</ejs-toolbar>
</ng-template>
<ng-template #content2 let-data>
<ejs-treeview id='treeelement' [fields]='field'></ejs-treeview>
</ng-template>
<ng-template #content3 let-data>
<ejs-tab id="element">
<e-tabitems>
<e-tabitem [header]='headerText[0]' [content]="contentTab1"></e-tabitem>
<e-tabitem [header]='headerText[1]' [content]="contentTab2"></e-tabitem>
<e-tabitem [header]='headerText[2]' [content]="contentTab3"></e-tabitem>
</e-tabitems>
</ejs-tab>
</ng-template>
App.component.ts
import { Component, ViewChild, TemplateRef } from '@angular/core';
.
.
.
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';
@ViewChild('content') content: TemplateRef<any>; // refer templateref for content
//use code for other components here
}
|