Frontend for Virtual Coding Lab (VCL).
Also includes codemirror for future updates.
- Node.js
- Recommended: Current LTS Version
- See also: NVM
- NPM (comes with Node.js)
- Angular CLI
npm install -g @angular/clito install Angular CLI globally
- Webbrowser with Devtools
At the current state, there is no communication with
the backend.
Later you also will need a local (or remote) connection to it, docs will be updated then.
- Clone the project
git clone git@mode.fh-joanneum.at:cola/vcl/frontend.git - Switch into directory
cd frontend - Install node dependencies
npm ci - Run Development server and open Browser on http://localhost:4200/
ng serve
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change
any of the source files.
Run ng generate component component-name to generate a new component. You can also
use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a
package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help or go check out
the Angular CLI Overview and Command Reference page.
- HeaderComponent.html (extend HTML) -> Dropdown = "Draft 1", "Draft 2", "Draft 3", ...
- HeaderComponent.ts -> function "changeDraft(draft: string | number)" -> this.draftService.setDraft(draft)
- (new) DraftService.ts ->
{
public draftObs: Observable...
private currentDraft: string | number
public getDraft(): Observable<string | number> {
return draftObs
}
public setDraft(draft: string | number) {
draftObs.next(draft);
}
}
- WelcomeComponent.ts + WorkshopsComponent.ts -> use DraftService via Constructor
- draftService.getDraft()
- instance variable (e.g. "draft")
- WelcomeComponent.html + WorkshopsComponent.html -> only display chosen draft ... *ngIf
