This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'} | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core'; | |
@Directive({ | |
selector: '[enableForRole]', | |
}) | |
export class EnableForRoleDirective { | |
constructor( | |
private viewContainerRef: ViewContainerRef, | |
private templateRef: TemplateRef<any> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'example-component', | |
template: '<div>Hello world! I'm an example component!</div>', | |
}) | |
export class ExampleComponent { | |
constructor() { | |
console.log('Hey I am an example component!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
@NgModule({ | |
imports: [], | |
declarations: [], | |
}) | |
export class ExampleModule { | |
constructor() { | |
console.log('Hi, I am an example module!'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<example-component | |
[exampleProperty]="exampleData"> | |
</example-component> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, HostListener } from '@angular/core'; | |
@Component({ | |
selector: 'example-component', | |
template: ‘Hey another component!' | |
}) | |
export class ExampleComponent { | |
@HostListener('click', ['$event']) | |
onHostClick(event: Event) { | |
// clicked, `event` available |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { MyService } from './my-service'; | |
@Component({ | |
selector: 'example-component', | |
template: 'More component example!' | |
}) | |
export class ExampleComponent { | |
constructor(myService: MyService) { | |
console.log(myService); // MyService |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import Swal from 'sweetalert2'; | |
@Component({ | |
selector: 'example-component', | |
template: ‘Swal component!' | |
}) | |
export class ExampleComponent implements OnInit { | |
constructor() {} |
OlderNewer