Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Muhammad Raza
MIT_project
Commits
b861e96e
Commit
b861e96e
authored
Jan 13, 2022
by
Muhammad Saroosh Asif
Browse files
Commit
parent
7a0be89a
Changes
9
Show whitespace changes
Inline
Side-by-side
MIT-IOSAPP/src/app/login/login.component.css
0 → 100644
View file @
b861e96e
.form-error
{
color
:
red
!important
;
}
.has-error
{
margin-bottom
:
5px
;
}
.logincard
{
width
:
40%
;
height
:
50%
;
text-align
:
center
;
margin
:
0
auto
;
}
\ No newline at end of file
MIT-IOSAPP/src/app/login/login.service.ts
0 → 100644
View file @
b861e96e
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
HttpClient
,
HttpHeaders
}
from
'
@angular/common/http
'
;
import
{
User
}
from
'
../user
'
;
@
Injectable
({
providedIn
:
'
root
'
})
export
class
LoginService
{
constructor
(
private
http
:
HttpClient
)
{
}
loginUser
(
user
:
User
)
{
const
httpOptions
=
{
headers
:
new
HttpHeaders
({
'
Content-Type
'
:
'
application/json
'
,
})
}
return
this
.
http
.
post
<
User
>
(
"
/api/auth/login
"
,
user
,
httpOptions
)
}
}
MIT-IOSAPP/src/app/register/register.component.css
0 → 100644
View file @
b861e96e
MIT-IOSAPP/src/app/register/register.component.html
0 → 100644
View file @
b861e96e
<p>
register works!
</p>
MIT-IOSAPP/src/app/register/register.component.ts
0 → 100644
View file @
b861e96e
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
@
Component
({
selector
:
'
app-register
'
,
templateUrl
:
'
./register.component.html
'
,
styleUrls
:
[
'
./register.component.css
'
]
})
export
class
RegisterComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
MIT-IOSAPP/src/app/user/user.component.css
0 → 100644
View file @
b861e96e
MIT-IOSAPP/src/app/user/user.component.html
0 → 100644
View file @
b861e96e
<p>
user works!
</p>
MIT-IOSAPP/src/app/user/user.component.spec.ts
0 → 100644
View file @
b861e96e
import
{
async
,
ComponentFixture
,
TestBed
}
from
'
@angular/core/testing
'
;
import
{
UserComponent
}
from
'
./user.component
'
;
describe
(
'
UserComponent
'
,
()
=>
{
let
component
:
UserComponent
;
let
fixture
:
ComponentFixture
<
UserComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
UserComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
UserComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'
should create
'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
MIT-IOSAPP/src/app/user/user.component.ts
0 → 100644
View file @
b861e96e
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
@
Component
({
selector
:
'
app-user
'
,
templateUrl
:
'
./user.component.html
'
,
styleUrls
:
[
'
./user.component.css
'
]
})
export
class
UserComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
Write
Preview
Supports
Markdown
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