Skip to content

Instantly share code, notes, and snippets.

View Bilkiss's full-sized avatar

Bilkiss Dulloo Bilkiss

  • TechSphere Labs
  • Mauritius
View GitHub Profile
import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';
@Directive({
selector: '[enableForRole]',
})
export class EnableForRoleDirective {
constructor(
private viewContainerRef: ViewContainerRef,
private templateRef: TemplateRef<any>
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { CvComponent } from "./components/cv/cv.component";
const routes: Routes = [
{ path: 'cv', component: CvComponent },
{ path: '**', redirectTo: 'cv'}
];
<p class="lead">Creating Curriculum Vitae!</p>
<div class="card mb-4">
<div class="card-body">
<form [formGroup]="cvForm">
<div class="form-group row mt-4 mb-4">
<div class="col-sm-10 offset-sm-1">
<legend class="border-bottom">Personal details</legend>
</div>
</div>
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators} from "@angular/forms";
@Component({
selector: 'app-cv',
templateUrl: './cv.component.html',
styleUrls: ['./cv.component.scss']
})
export class CvComponent implements OnInit {