Skip to content

Commit d7667bb

Browse files
committed
Update For the Session
1 parent c01ee5c commit d7667bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+6726
-15
lines changed
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { NgModule } from '@angular/core';
2+
import { BrowserModule } from '@angular/platform-browser';
3+
4+
import { HelloComponent } from './hello.component';
5+
6+
7+
8+
@NgModule({
9+
imports: [ BrowserModule ],
10+
declarations: [ HelloComponent],
11+
bootstrap: [ HelloComponent ]
12+
})
13+
export class AppModule { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import {Component} from '@angular/core';
2+
import {User} from './user';
3+
4+
@Component({
5+
selector: 'u2u-hello',
6+
template: `
7+
<div>
8+
<p>Welcome {{user.userName}}</p>
9+
<input type="button" (click)="sayHello()" value="Hello"/>
10+
</div>
11+
`
12+
})
13+
export class HelloComponent {
14+
user: User = { userName: 'Diedrik', password : 'password' };
15+
16+
sayHello() {
17+
console.log('Hello my name is:', this.user.userName);
18+
}
19+
}

2 - Starting a component/app/user.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export class User{
2+
constructor(public userName: string, public password: string){
3+
4+
}
5+
}

2 - Starting a component/index.html

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Awesome Hello World!</title>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<base href=".">
8+
9+
<!-- 1. Load libraries -->
10+
<!-- Polyfill(s) for older browsers -->
11+
<script src="node_modules/core-js/client/shim.min.js"></script>
12+
13+
<script src="node_modules/zone.js/dist/zone.js"></script>
14+
<script src="node_modules/reflect-metadata/Reflect.js"></script>
15+
<script src="node_modules/systemjs/dist/system.src.js"></script>
16+
17+
<script src="node_modules/jquery/dist/jquery.min.js"></script>
18+
<script src="node_modules/materialize-css/dist/js/materialize.min.js"></script>
19+
20+
<!-- 2. Configure SystemJS -->
21+
<script src="lib/system.config.js"></script>
22+
<script>
23+
System.import('app').catch(function(err){ console.error(err); });
24+
</script>
25+
</head>
26+
27+
<!-- 3. Display the application -->
28+
<body>
29+
<u2u-hello>Loading...</u2u-hello>
30+
</body>
31+
</html>

0 commit comments

Comments
 (0)