Create Sample Demo
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.
Generate a new Project
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
Install Angular Material
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="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <-- Include inindex.html
Update app.module.ts by:
import { MaterialModule } from '@angular/material';
Add "MaterialModule.forRoot()" in the imports array of ngModule.
Install Cedrus Fusion Library
"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.+
Use the needed components and Wire them together
Refer to the documentation of the components, create your customized objects to describe them and use the components in your templates.
Last updated