Create Sample Demo
Last updated
Last updated
This section explains how to use the business components easily from Cedrus Fusion Library in an application. The demo is presented by creating a sample application from scratch that uses/wires two business components from the library following the below steps:
Generate a new project using Angular Cli
Install Angular Material
Install Cedrus Fusion Library
Use the needed components and Wire them together.
To create a new Angular 2 project, all what you to do is install angular-cli and then use it to create your project as following:
"npm install -g angular-cli" <--- Install Angular Cli
"ng new PROJECT_NAME" <--- Create your project
"cd PROJECT_NAME" <-Access your project directory
To install angular material in your cli project, all what you have to do is:
"npm install --save @angular/material" <--- Install Angular Material
"npm install --save hammerjs" <--- Support library for Angular Material
<link href="" rel="stylesheet"> <-- Include inindex.html
Update app.module.ts by:
import { MaterialModule } from '@angular/material';
Add "MaterialModule.forRoot()" in the imports array of ngModule.
"npm install --save cedrus-fusion" <---Install the library
Update app.module.ts by:
import { CfModule } from 'cedrus-fusion/src/app/app.module';
Add "CfModule" in the imports array of ngModule.+
Refer to the documentation of the components, create your customized objects to describe them and use the components in your templates.