Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
M
Mean
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jakkree kongpha
Mean
Commits
164e2e94
Commit
164e2e94
authored
Sep 30, 2020
by
jakkree kongpha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
insert component
parent
c11345db
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
101 additions
and
2 deletions
+101
-2
package-lock.json
mean/package-lock.json
+0
-0
app-routing.module.ts
mean/src/app/app-routing.module.ts
+13
-0
app.module.ts
mean/src/app/app.module.ts
+3
-1
creat-anime.component.css
mean/src/app/creat-anime/creat-anime.component.css
+0
-0
creat-anime.component.html
mean/src/app/creat-anime/creat-anime.component.html
+1
-0
creat-anime.component.spec.ts
mean/src/app/creat-anime/creat-anime.component.spec.ts
+25
-0
creat-anime.component.ts
mean/src/app/creat-anime/creat-anime.component.ts
+15
-0
header.component.html
mean/src/app/header/header.component.html
+2
-0
home.component.html
mean/src/app/home/home.component.html
+1
-1
manageanime.component.css
mean/src/app/manageanime/manageanime.component.css
+0
-0
manageanime.component.html
mean/src/app/manageanime/manageanime.component.html
+1
-0
manageanime.component.spec.ts
mean/src/app/manageanime/manageanime.component.spec.ts
+25
-0
manageanime.component.ts
mean/src/app/manageanime/manageanime.component.ts
+15
-0
No files found.
mean/package-lock.json
View file @
164e2e94
This diff is collapsed.
Click to expand it.
mean/src/app/app-routing.module.ts
View file @
164e2e94
...
...
@@ -3,6 +3,8 @@ import { RouterModule, Routes } from '@angular/router';
import
{
AuthGuard
}
from
'./shared/guards'
;
import
{
HomeComponent
}
from
'./home/home.component'
;
import
{
ManageanimeComponent
}
from
'./manageanime/manageanime.component'
;
import
{
CreatAnimeComponent
}
from
'./creat-anime/creat-anime.component'
;
const
routes
:
Routes
=
[
{
...
...
@@ -10,6 +12,17 @@ const routes: Routes = [
component
:
HomeComponent
,
canActivate
:
[
AuthGuard
],
},
{
path
:
"anime"
,
component
:
ManageanimeComponent
,
canActivate
:
[
AuthGuard
],
},
{
path
:
"create"
,
component
:
CreatAnimeComponent
,
canActivate
:
[
AuthGuard
],
},
{
path
:
'auth'
,
loadChildren
:
()
=>
import
(
'./auth/auth.module'
).
then
(
m
=>
m
.
AuthModule
),
...
...
mean/src/app/app.module.ts
View file @
164e2e94
...
...
@@ -12,6 +12,8 @@ import { AppRoutingModule } from './app-routing.module';
import
{
HeaderComponent
}
from
'./header/header.component'
;
import
{
HomeComponent
}
from
'./home/home.component'
;
import
{
AuthService
}
from
'./shared/services'
;
import
{
ManageanimeComponent
}
from
'./manageanime/manageanime.component'
;
import
{
CreatAnimeComponent
}
from
'./creat-anime/creat-anime.component'
;
export
function
appInitializerFactory
(
authService
:
AuthService
)
{
return
()
=>
authService
.
checkTheUserOnTheFirstLoad
();
...
...
@@ -19,7 +21,7 @@ export function appInitializerFactory(authService: AuthService) {
@
NgModule
({
imports
:
[
BrowserAnimationsModule
,
HttpClientModule
,
SharedModule
,
AppRoutingModule
],
declarations
:
[
AppComponent
,
HeaderComponent
,
HomeComponent
],
declarations
:
[
AppComponent
,
HeaderComponent
,
HomeComponent
,
ManageanimeComponent
,
CreatAnimeComponent
],
providers
:
[
{
provide
:
HTTP_INTERCEPTORS
,
...
...
mean/src/app/creat-anime/creat-anime.component.css
0 → 100644
View file @
164e2e94
mean/src/app/creat-anime/creat-anime.component.html
0 → 100644
View file @
164e2e94
<p>
creat-anime works!
</p>
mean/src/app/creat-anime/creat-anime.component.spec.ts
0 → 100644
View file @
164e2e94
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
CreatAnimeComponent
}
from
'./creat-anime.component'
;
describe
(
'CreatAnimeComponent'
,
()
=>
{
let
component
:
CreatAnimeComponent
;
let
fixture
:
ComponentFixture
<
CreatAnimeComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
CreatAnimeComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
CreatAnimeComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
mean/src/app/creat-anime/creat-anime.component.ts
0 → 100644
View file @
164e2e94
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-creat-anime'
,
templateUrl
:
'./creat-anime.component.html'
,
styleUrls
:
[
'./creat-anime.component.css'
]
})
export
class
CreatAnimeComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
mean/src/app/header/header.component.html
View file @
164e2e94
...
...
@@ -4,6 +4,8 @@
<span
class=
"example-spacer"
></span>
<a
class=
"links side"
routerLink=
"/auth/login"
*
ngIf=
"!user"
>
Login
</a>
<div>
<a
class=
"links side"
*
ngIf=
"user"
routerLink=
"/anime"
>
Manage anime
</a>
<a
class=
"links side"
*
ngIf=
"user"
routerLink=
"/create"
>
Create anime
</a>
<a
class=
"links side"
*
ngIf=
"user"
[
matMenuTriggerFor
]="
menu
"
>
<mat-icon>
account_circle
</mat-icon>
{{ user.fullname }}
</a>
...
...
mean/src/app/home/home.component.html
View file @
164e2e94
<p>
home works!
test build
home works!
</p>
mean/src/app/manageanime/manageanime.component.css
0 → 100644
View file @
164e2e94
mean/src/app/manageanime/manageanime.component.html
0 → 100644
View file @
164e2e94
<p>
manageanime works!
</p>
mean/src/app/manageanime/manageanime.component.spec.ts
0 → 100644
View file @
164e2e94
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
ManageanimeComponent
}
from
'./manageanime.component'
;
describe
(
'ManageanimeComponent'
,
()
=>
{
let
component
:
ManageanimeComponent
;
let
fixture
:
ComponentFixture
<
ManageanimeComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
ManageanimeComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
ManageanimeComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
mean/src/app/manageanime/manageanime.component.ts
0 → 100644
View file @
164e2e94
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-manageanime'
,
templateUrl
:
'./manageanime.component.html'
,
styleUrls
:
[
'./manageanime.component.css'
]
})
export
class
ManageanimeComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
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