-
Notifications
You must be signed in to change notification settings - Fork 2
Create module
florianInfo edited this page Feb 21, 2019
·
18 revisions
HOME > DOCUMENTATION > CREATE MODULE
- Go in src/api/core/demo/input
- Create a folder called : type-input where type is the type of the input (ex: image-input, sound-input, ...)
- Create 2 typescript files inside : type-input.component.ts and type-input.presenter.ts
- Write this code in the type-input.component.ts file:
import {InputComponent} from '../input.component';
import { TypeInputPresenter } from './json-input.presenter';
export interface TypeInputComponent extends InputComponent{
getPresenter():TypeInputPresenter;
//some methods to implements
}
Replace Type by the name given before.
- Write this code in the type-input.presenter.ts file :
import {InputPresenter} from '../input.presenter';
export interface TypeInputPresenter extends InputPresenter{
//some methods to implements
}
Replace Type by the name given before.
- In the folder src/api/core/demo/input create a file type-input.d.ts
- Write this code inside (export new interfaces created just before) :
export * from './type-input/type-input.presenter'
export * from './type-input/type-input.component'
- open cmd
- go in src/app/demo/input
- command to generate a new component : ng generate component component_name