diff options
author | Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> | 2018-05-08 12:45:04 +0200 |
---|---|---|
committer | Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> | 2018-05-08 12:45:04 +0200 |
commit | 57e37455ca3b0810f6b3a960c6300be2486c31de (patch) | |
tree | 3c7d0d2c0c268542cb76494dae634e27071c5a84 /src/app | |
parent | b9165f58f27c8209797c0acf5fd1c83124de0849 (diff) | |
download | gnunet-webui-57e37455ca3b0810f6b3a960c6300be2486c31de.tar.gz gnunet-webui-57e37455ca3b0810f6b3a960c6300be2486c31de.zip |
add hello world
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/app.component.css | 0 | ||||
-rw-r--r-- | src/app/app.component.html | 20 | ||||
-rw-r--r-- | src/app/app.component.spec.ts | 27 | ||||
-rw-r--r-- | src/app/app.component.ts | 10 | ||||
-rw-r--r-- | src/app/app.module.ts | 18 |
5 files changed, 75 insertions, 0 deletions
diff --git a/src/app/app.component.css b/src/app/app.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/app.component.css | |||
diff --git a/src/app/app.component.html b/src/app/app.component.html new file mode 100644 index 0000000..fa2706a --- /dev/null +++ b/src/app/app.component.html | |||
@@ -0,0 +1,20 @@ | |||
1 | <!--The content below is only a placeholder and can be replaced.--> | ||
2 | <div style="text-align:center"> | ||
3 | <h1> | ||
4 | Welcome to {{ title }}! | ||
5 | </h1> | ||
6 | <img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="> | ||
7 | </div> | ||
8 | <h2>Here are some links to help you start: </h2> | ||
9 | <ul> | ||
10 | <li> | ||
11 | <h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2> | ||
12 | </li> | ||
13 | <li> | ||
14 | <h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2> | ||
15 | </li> | ||
16 | <li> | ||
17 | <h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2> | ||
18 | </li> | ||
19 | </ul> | ||
20 | |||
diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts new file mode 100644 index 0000000..bcbdf36 --- /dev/null +++ b/src/app/app.component.spec.ts | |||
@@ -0,0 +1,27 @@ | |||
1 | import { TestBed, async } from '@angular/core/testing'; | ||
2 | import { AppComponent } from './app.component'; | ||
3 | describe('AppComponent', () => { | ||
4 | beforeEach(async(() => { | ||
5 | TestBed.configureTestingModule({ | ||
6 | declarations: [ | ||
7 | AppComponent | ||
8 | ], | ||
9 | }).compileComponents(); | ||
10 | })); | ||
11 | it('should create the app', async(() => { | ||
12 | const fixture = TestBed.createComponent(AppComponent); | ||
13 | const app = fixture.debugElement.componentInstance; | ||
14 | expect(app).toBeTruthy(); | ||
15 | })); | ||
16 | it(`should have as title 'app'`, async(() => { | ||
17 | const fixture = TestBed.createComponent(AppComponent); | ||
18 | const app = fixture.debugElement.componentInstance; | ||
19 | expect(app.title).toEqual('app'); | ||
20 | })); | ||
21 | it('should render title in a h1 tag', async(() => { | ||
22 | const fixture = TestBed.createComponent(AppComponent); | ||
23 | fixture.detectChanges(); | ||
24 | const compiled = fixture.debugElement.nativeElement; | ||
25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); | ||
26 | })); | ||
27 | }); | ||
diff --git a/src/app/app.component.ts b/src/app/app.component.ts new file mode 100644 index 0000000..7b0f672 --- /dev/null +++ b/src/app/app.component.ts | |||
@@ -0,0 +1,10 @@ | |||
1 | import { Component } from '@angular/core'; | ||
2 | |||
3 | @Component({ | ||
4 | selector: 'app-root', | ||
5 | templateUrl: './app.component.html', | ||
6 | styleUrls: ['./app.component.css'] | ||
7 | }) | ||
8 | export class AppComponent { | ||
9 | title = 'app'; | ||
10 | } | ||
diff --git a/src/app/app.module.ts b/src/app/app.module.ts new file mode 100644 index 0000000..926975a --- /dev/null +++ b/src/app/app.module.ts | |||
@@ -0,0 +1,18 @@ | |||
1 | import { BrowserModule } from '@angular/platform-browser'; | ||
2 | import { NgModule } from '@angular/core'; | ||
3 | |||
4 | |||
5 | import { AppComponent } from './app.component'; | ||
6 | |||
7 | |||
8 | @NgModule({ | ||
9 | declarations: [ | ||
10 | AppComponent | ||
11 | ], | ||
12 | imports: [ | ||
13 | BrowserModule | ||
14 | ], | ||
15 | providers: [], | ||
16 | bootstrap: [AppComponent] | ||
17 | }) | ||
18 | export class AppModule { } | ||