Skip to content

Instantly share code, notes, and snippets.

View wKoza's full-sized avatar
🌏
A new opportunity ? hmmm why not

William Koza wKoza

🌏
A new opportunity ? hmmm why not
  • Self-employment
  • France
View GitHub Profile
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app works!';
}
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<h1>Mon premier Component</h1>
<p>en action</p>
`,
  styleUrls: ['./app.component.css']
})
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>MonPremierProjet</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
import { Component} from '@angular/core';
@Component({
selector: 'app-child',
template: `
<h1>Mon second Component</h1>
`,
styles: [`
h1 {
color : blue;
import { Component } from '@angular/core';
@Component({
selector: 'app-cadre',
template: `
<div class="bordure">
<h1>
<ng-content></ng-content>
</h1>
</div>
import {Component} from '@angular/core';
@Component({
selector: 'app-root',
template: `
<h1>Mon premier Component</h1>
<app-child></app-child>
`,
styles: [`
h1 {
import {Component, ViewEncapsulation} from '@angular/core';
@Component({
selector: 'app-root',
template: `
<h1>Mon premier Component</h1>
<app-child></app-child>
`,
styles: [`
h1 {
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: `
Personne : {{person}} | Age : {{age}} | Adresse : {{address}}
`
})
export class AppComponent {
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<div>Personne : {{person}} | Age : {{age}} | Adresse : {{address}}</div>
`
})
export class AppComponent {
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<div [align]="alignement" >Personne : {{person}} | Age : {{age}} | Adresse : {{address.street}}</div>
`
})