Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
awa-w8d2-angularcont-practice
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Arndt
awa-w8d2-angularcont-practice
Commits
2f9c93a9
Commit
2f9c93a9
authored
Apr 21, 2021
by
earndt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[W8D3] (ArndtED) Adds contactUs component, links from footer
parent
bcfd7b2e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
52 additions
and
29 deletions
+52
-29
account.component.html
myApp/src/app/account/account.component.html
+3
-26
app-routing.module.ts
myApp/src/app/app-routing.module.ts
+3
-1
app.module.ts
myApp/src/app/app.module.ts
+3
-1
contact-us.component.css
myApp/src/app/contact-us/contact-us.component.css
+0
-0
contact-us.component.html
myApp/src/app/contact-us/contact-us.component.html
+1
-0
contact-us.component.spec.ts
myApp/src/app/contact-us/contact-us.component.spec.ts
+25
-0
contact-us.component.ts
myApp/src/app/contact-us/contact-us.component.ts
+15
-0
footer.component.html
myApp/src/app/footer/footer.component.html
+2
-1
No files found.
myApp/src/app/account/account.component.html
View file @
2f9c93a9
<div>
<div>
<form
[
formGroup
]="
userForm
"
(
ngSubmit
)="
onSubmit1
()"
>
<p>
Sign up
</p>
<div>
<div>
<div>
<input
type=
"text"
formControlName=
"firstName"
class=
"form-control input"
placeholder=
"First name"
>
</div>
<div>
<input
type=
"text"
formControlName=
"lastName"
class=
"form-control input "
placeholder=
"Last name"
>
</div>
</div>
<input
type=
"email"
formControlName=
"email"
class=
"form-control input"
placeholder=
"E-mail"
>
<div>
<button
type=
"submit"
>
Sign in
</button>
</div>
</form>
<div
>
<!-- <ngb-alert *ngIf="showMessage" type="danger" >{{ invalidEntry }}</ngb-alert> -->
<!-- <div class= "invalid-text" *ngIf="showMessage">
{{invalidEntry}}
</div> -->
</div>
</div>
<div>
<div
style=
"display:inline-block"
>
<div
style=
"display:inline-block"
>
<form
[
formGroup
]="
userForm
"
(
ngSubmit
)="
onSubmit
()"
>
<form
[
formGroup
]="
userForm
"
(
ngSubmit
)="
onSubmit
()"
>
<div>
<div>
...
@@ -49,7 +23,9 @@
...
@@ -49,7 +23,9 @@
</div> -->
</div> -->
</div>
</div>
</div>
</div>
</div>
<!-- template driven form -->
<!-- template driven form -->
<div>
<div
style=
"display:inline-block; margin-left: 10em;"
>
<div
style=
"display:inline-block; margin-left: 10em;"
>
<form
#
newUserForm=
"ngForm"
(
ngSubmit
)="
onSubmit2
(
newUserForm
)"
>
<form
#
newUserForm=
"ngForm"
(
ngSubmit
)="
onSubmit2
(
newUserForm
)"
>
<div>
<div>
...
@@ -88,5 +64,6 @@
...
@@ -88,5 +64,6 @@
<!-- <pre>{{ newUserForm.form.value }}</pre> Value of whole form -->
<!-- <pre>{{ newUserForm.form.value }}</pre> Value of whole form -->
<!-- <pre>User name: {{ pickedName.value }}</pre> Value of userName field -->
<!-- <pre>User name: {{ pickedName.value }}</pre> Value of userName field -->
<pre>
Valid form? {{ newUserForm.form.valid }}
</pre>
<pre>
Valid form? {{ newUserForm.form.valid }}
</pre>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
myApp/src/app/app-routing.module.ts
View file @
2f9c93a9
import
{
NgModule
}
from
'@angular/core'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
RouterModule
,
Routes
}
from
'@angular/router'
;
import
{
RouterModule
,
Routes
}
from
'@angular/router'
;
import
{
AccountComponent
}
from
'./account/account.component'
;
import
{
AccountComponent
}
from
'./account/account.component'
;
import
{
ContactUsComponent
}
from
'./contact-us/contact-us.component'
;
import
{
EnglandComponent
}
from
'./england/england.component'
;
import
{
EnglandComponent
}
from
'./england/england.component'
;
import
{
FranceComponent
}
from
'./france/france.component'
;
import
{
FranceComponent
}
from
'./france/france.component'
;
import
{
GreeceComponent
}
from
'./greece/greece.component'
;
import
{
GreeceComponent
}
from
'./greece/greece.component'
;
...
@@ -11,7 +12,8 @@ const routes: Routes = [
...
@@ -11,7 +12,8 @@ const routes: Routes = [
{
path
:
'france'
,
component
:
FranceComponent
},
{
path
:
'france'
,
component
:
FranceComponent
},
{
path
:
'spain'
,
component
:
SpainComponent
},
{
path
:
'spain'
,
component
:
SpainComponent
},
{
path
:
'greece'
,
component
:
GreeceComponent
},
{
path
:
'greece'
,
component
:
GreeceComponent
},
{
path
:
'account'
,
component
:
AccountComponent
}
{
path
:
'account'
,
component
:
AccountComponent
},
{
path
:
'contactUs'
,
component
:
ContactUsComponent
}
];
];
@
NgModule
({
@
NgModule
({
...
...
myApp/src/app/app.module.ts
View file @
2f9c93a9
...
@@ -12,6 +12,7 @@ import { FranceComponent } from './france/france.component';
...
@@ -12,6 +12,7 @@ import { FranceComponent } from './france/france.component';
import
{
SpainComponent
}
from
'./spain/spain.component'
;
import
{
SpainComponent
}
from
'./spain/spain.component'
;
import
{
GreeceComponent
}
from
'./greece/greece.component'
;
import
{
GreeceComponent
}
from
'./greece/greece.component'
;
import
{
AccountComponent
}
from
'./account/account.component'
;
import
{
AccountComponent
}
from
'./account/account.component'
;
import
{
ContactUsComponent
}
from
'./contact-us/contact-us.component'
;
@
NgModule
({
@
NgModule
({
declarations
:
[
declarations
:
[
...
@@ -22,7 +23,8 @@ import { AccountComponent } from './account/account.component';
...
@@ -22,7 +23,8 @@ import { AccountComponent } from './account/account.component';
FranceComponent
,
FranceComponent
,
SpainComponent
,
SpainComponent
,
GreeceComponent
,
GreeceComponent
,
AccountComponent
AccountComponent
,
ContactUsComponent
],
],
imports
:
[
imports
:
[
BrowserModule
,
BrowserModule
,
...
...
myApp/src/app/contact-us/contact-us.component.css
0 → 100644
View file @
2f9c93a9
myApp/src/app/contact-us/contact-us.component.html
0 → 100644
View file @
2f9c93a9
<p>
contact-us works!
</p>
myApp/src/app/contact-us/contact-us.component.spec.ts
0 → 100644
View file @
2f9c93a9
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
ContactUsComponent
}
from
'./contact-us.component'
;
describe
(
'ContactUsComponent'
,
()
=>
{
let
component
:
ContactUsComponent
;
let
fixture
:
ComponentFixture
<
ContactUsComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
ContactUsComponent
]
})
.
compileComponents
();
});
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
ContactUsComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
myApp/src/app/contact-us/contact-us.component.ts
0 → 100644
View file @
2f9c93a9
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-contact-us'
,
templateUrl
:
'./contact-us.component.html'
,
styleUrls
:
[
'./contact-us.component.css'
]
})
export
class
ContactUsComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
myApp/src/app/footer/footer.component.html
View file @
2f9c93a9
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<ul>
<ul>
<li>
About Us
</li>
<li>
About Us
</li>
<li>
Careers
</li>
<li>
Careers
</li>
<li>
Contact Us
</li>
<!-- <button [routerLink]="['/england']">England</button> -->
<li
[
routerLink
]="['/
contactUs
']"
>
Contact Us
</li>
</ul>
</ul>
</div>
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment