Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 806c9c54
authored
Apr 01, 2018
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/routing' into 'master'
Feature/routing See merge request
!398
2 parents
091de5de
08aa64f6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4 additions
and
69 deletions
code/moya-angular/src/app/app-routing.module.ts
code/moya-angular/src/app/pages/login/login.module.ts
code/moya-angular/src/app/test/test.component.html
code/moya-angular/src/app/test/test.component.scss
code/moya-angular/src/app/test/test.component.spec.ts
code/moya-angular/src/app/test/test.component.ts
code/moya-angular/src/app/app-routing.module.ts
View file @
806c9c5
import
{
NgModule
}
from
'@angular/core'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
Routes
,
RouterModule
}
from
'@angular/router'
;
import
{
Routes
,
RouterModule
,
PreloadAllModules
}
from
'@angular/router'
;
import
{
LoginComponent
}
from
'./pages/login/login.component'
;
import
{
LoginComponent
}
from
'./pages/login/login.component'
;
import
{
InfoComponent
}
from
'./pages/info/info.component'
;
import
{
InfoComponent
}
from
'./pages/info/info.component'
;
...
@@ -16,7 +16,8 @@ const APP_ROUTES: Routes = [
...
@@ -16,7 +16,8 @@ const APP_ROUTES: Routes = [
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
RouterModule
.
forRoot
(
RouterModule
.
forRoot
(
APP_ROUTES
APP_ROUTES
,
{
preloadingStrategy
:
PreloadAllModules
}
)
)
],
],
exports
:
[
exports
:
[
...
...
code/moya-angular/src/app/pages/login/login.module.ts
View file @
806c9c5
...
@@ -9,6 +9,6 @@ import { TopMenuComponent } from '../../menu/top-menu/top-menu.component';
...
@@ -9,6 +9,6 @@ import { TopMenuComponent } from '../../menu/top-menu/top-menu.component';
CommonModule
,
CommonModule
,
LoginRoutingModule
LoginRoutingModule
],
],
declarations
:
[
LoginComponent
,
TopMenuComponent
]
declarations
:
[]
})
})
export
class
LoginModule
{
}
export
class
LoginModule
{
}
code/moya-angular/src/app/test/test.component.html
deleted
100644 → 0
View file @
091de5d
<span
i18n
>
This is testfile
</span>
<br
/>
<br
/>
<br
/>
<h1
i18n
>
Counter value
</h1>
{{counter}}
<p
i18n
>
{counter, plural, =0 {not pressed} =1 {pressed once} other {pressed many times}}
</p>
<button
(
click
)="
addOne
()"
i18n
>
ADD ONE
</button>
<span
i18n
>
This is testfile
</span>
code/moya-angular/src/app/test/test.component.scss
deleted
100644 → 0
View file @
091de5d
File mode changed
code/moya-angular/src/app/test/test.component.spec.ts
deleted
100644 → 0
View file @
091de5d
/* tslint:disable:no-unused-variable */
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
By
}
from
'@angular/platform-browser'
;
import
{
DebugElement
}
from
'@angular/core'
;
import
{
TestComponent
}
from
'./test.component'
;
describe
(
'TestComponent'
,
()
=>
{
let
component
:
TestComponent
;
let
fixture
:
ComponentFixture
<
TestComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
TestComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
TestComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
code/moya-angular/src/app/test/test.component.ts
deleted
100644 → 0
View file @
091de5d
import
{
Component
,
OnInit
,
Input
}
from
'@angular/core'
;
@
Component
({
selector
:
'moya-test'
,
templateUrl
:
'./test.component.html'
,
styleUrls
:
[
'./test.component.scss'
]
})
export
class
TestComponent
implements
OnInit
{
@
Input
()
counter
:
number
;
constructor
()
{
this
.
counter
=
0
;
}
ngOnInit
()
{
}
addOne
()
{
this
.
counter
++
;
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment