Initial commit

This commit is contained in:
2022-11-03 16:01:08 +01:00
commit 4a0538d5ee
13 changed files with 298 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
p {
font-family: Lato;
}

View File

@@ -0,0 +1,4 @@
<hello name="{{ name }}"></hello>
<p>
Start editing to see some magic happen :)
</p>

10
src/app/app.component.ts Normal file
View File

@@ -0,0 +1,10 @@
import { Component, VERSION } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
name = 'Angular ' + VERSION.major;
}

13
src/app/app.module.ts Normal file
View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { HelloComponent } from './hello.component';
@NgModule({
imports: [ BrowserModule, FormsModule ],
declarations: [ AppComponent, HelloComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }

View File

@@ -0,0 +1,10 @@
import { Component, Input } from '@angular/core';
@Component({
selector: 'hello',
template: `<h1>Hello {{name}}!</h1>`,
styles: [`h1 { font-family: Lato; }`]
})
export class HelloComponent {
@Input() name: string;
}