# 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:

1. Generate a new project using Angular Cli
2. Install Angular Material
3. Install Cedrus Fusion Library
4. Use the needed components and Wire them together.

## Generate a new Project <a href="#generate-a-new-project" id="generate-a-new-project"></a>

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:

1. "npm install -g angular-cli" <--- Install Angular Cli
2. "ng new PROJECT\_NAME" <--- Create your project
3. "cd PROJECT\_NAME" <-Access your project directory

## Install Angular Material <a href="#install-angular-material" id="install-angular-material"></a>

To install angular material in your cli project, all what you have to do is:

1. "npm install --save @angular/material" <--- Install Angular Material
2. "npm install --save hammerjs" <--- Support library for Angular Material
3. \<link href="<https://fonts.googleapis.com/icon?family=Material+Icons>" rel="stylesheet"> <-- Include in**index.html**
4. Update app.module.ts by:

import { MaterialModule } from '@angular/material';

Add "MaterialModule.forRoot()" in the imports array of ngModule.

## Install Cedrus Fusion Library <a href="#install-cedrus-fusion-library" id="install-cedrus-fusion-library"></a>

1. "npm install --save cedrus-fusion" <---Install the library
2. 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 <a href="#use-the-needed-components-and-wire-them-together" id="use-the-needed-components-and-wire-them-together"></a>

Refer to the documentation of the components, create your customized objects to describe them and use the components in your templates.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cedrus.gitbook.io/project-fusion/create-a-sample-demo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
