This repository has been archived by the owner on Mar 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(demo): show contact person form in demo
- Loading branch information
1 parent
4c36f12
commit 3ecf66f
Showing
14 changed files
with
122 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.example-card { | ||
max-width: 700px; | ||
margin: 20px auto; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,6 @@ | ||
<!--The content below is only a placeholder and can be replaced.--> | ||
<div style="text-align:center"> | ||
<h1> | ||
Welcome to {{ title }}! | ||
</h1> | ||
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="> | ||
</div> | ||
<h2>Here are some links to help you start: </h2> | ||
<ul> | ||
<li> | ||
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2> | ||
</li> | ||
<li> | ||
<h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2> | ||
</li> | ||
<li> | ||
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2> | ||
</li> | ||
</ul> | ||
|
||
<mat-card class="example-card"> | ||
<h1>Tenant contact</h1> | ||
|
||
<app-tenant-contact-example></app-tenant-contact-example> | ||
</mat-card> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import { Component } from '@angular/core'; | ||
import { Tenant } from '@hoepel.app/types'; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.css'] | ||
}) | ||
export class AppComponent { | ||
title = 'ng-hoepel-common-demo'; | ||
} | ||
export class AppComponent {} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { BrowserModule, DomSanitizer } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { AppComponent } from './app.component'; | ||
import { TenantContactModule } from '../../../ng-hoepel-common/src/lib/tenant-contact'; | ||
import { TenantContactExampleComponent } from './tenant-contact-example/tenant-contact-example.component'; | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | ||
import { MatCardModule, MatIconRegistry } from '@angular/material'; | ||
|
||
@NgModule({ | ||
declarations: [AppComponent], | ||
imports: [BrowserModule], | ||
declarations: [AppComponent, TenantContactExampleComponent], | ||
imports: [BrowserModule, TenantContactModule, BrowserAnimationsModule, MatCardModule], | ||
providers: [], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
constructor(matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer) { | ||
matIconRegistry.addSvgIconSet(domSanitizer.bypassSecurityTrustResourceUrl('./assets/mdi.svg')); | ||
} | ||
} |
Empty file.
8 changes: 8 additions & 0 deletions
8
...g-hoepel-common-demo/src/app/tenant-contact-example/tenant-contact-example.component.html
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<hoepel-tenant-contact-dumb | ||
[tenant]="tenant" | ||
(updated)="tenantContactUpdated($event)" | ||
></hoepel-tenant-contact-dumb> | ||
|
||
<pre *ngIf="result"> | ||
{{ result | json }} | ||
</pre> |
24 changes: 24 additions & 0 deletions
24
...oepel-common-demo/src/app/tenant-contact-example/tenant-contact-example.component.spec.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { TenantContactExampleComponent } from './tenant-contact-example.component'; | ||
|
||
describe('TenantContactExampleComponent', () => { | ||
let component: TenantContactExampleComponent; | ||
let fixture: ComponentFixture<TenantContactExampleComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [TenantContactExampleComponent] | ||
}).compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(TenantContactExampleComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
.../ng-hoepel-common-demo/src/app/tenant-contact-example/tenant-contact-example.component.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Tenant } from '@hoepel.app/types'; | ||
|
||
@Component({ | ||
selector: 'app-tenant-contact-example', | ||
templateUrl: './tenant-contact-example.component.html', | ||
styleUrls: ['./tenant-contact-example.component.css'] | ||
}) | ||
export class TenantContactExampleComponent implements OnInit { | ||
tenant: Tenant = { | ||
name: '', | ||
email: '', | ||
address: {}, | ||
contactPerson: {}, | ||
description: '' | ||
}; | ||
|
||
result: Tenant; | ||
|
||
tenantContactUpdated(tenant: Tenant) { | ||
this.result = tenant; | ||
} | ||
|
||
constructor() {} | ||
|
||
ngOnInit() {} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
/* You can add global styles to this file, and also import other style files */ | ||
|
||
@import "~@angular/material/prebuilt-themes/indigo-pink.css"; | ||
|
||
|
||
/* See https://www.npmjs.com/package/@mdi/angular-material#angular */ | ||
button.mat-menu-item { | ||
line-height: 24px !important; | ||
} | ||
a.mat-menu-item > mat-icon { | ||
margin-bottom: 14px; | ||
} | ||
.mat-icon svg { | ||
height: 24px; | ||
width: 24px; | ||
} | ||
|