Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a7951e5f
authored
Apr 01, 2018
by
Aino Leppänen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc stuff
1 parent
66dfe12c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
52 deletions
code/moya-angular/package.json
code/moya-angular/src/app/app-routing.module.ts
code/moya-angular/src/app/app.component.html
code/moya-angular/src/app/app.component.ts
code/moya-angular/src/app/app.module.ts
code/moya-angular/src/index.html
code/moya-angular/package.json
View file @
a7951e5
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@angular/cdk"
:
"^5.2.4"
,
"@angular/cdk"
:
"^5.2.4"
,
"@angular/cli"
:
"^1.
7.3
"
,
"@angular/cli"
:
"^1.
6.5
"
,
"@angular/compiler-cli"
:
"^5.2.9"
,
"@angular/compiler-cli"
:
"^5.2.9"
,
"@angular/language-service"
:
"^5.2.9"
,
"@angular/language-service"
:
"^5.2.9"
,
"@types/jasmine"
:
"~2.8.3"
,
"@types/jasmine"
:
"~2.8.3"
,
...
...
code/moya-angular/src/app/app-routing.module.ts
View file @
a7951e5
import
{
NgModule
}
from
'@angular/core'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
Routes
}
from
'@angular/router'
;
import
{
Routes
,
RouterModule
}
from
'@angular/router'
;
import
{
InfoComponent
}
from
'./pages/info/info
.component'
;
import
{
LoginComponent
}
from
'./pages/login/login
.component'
;
/* const appRoutes: Routes = [
/* const appRoutes: Routes = [
{
{
...
@@ -32,18 +32,30 @@ import { InfoComponent } from './pages/info/info.component';
...
@@ -32,18 +32,30 @@ import { InfoComponent } from './pages/info/info.component';
{path: 'old', pathMatch: 'prefix', component: OldMoyaComponent},
{path: 'old', pathMatch: 'prefix', component: OldMoyaComponent},
]; */
]; */
const
appRoutes
:
Routes
=
[
{
path
:
''
,
pathMatch
:
'full'
,
redirectTo
:
'login'
},
const
APP_ROUTES
:
Routes
=
[
{
path
:
'info'
,
loadChildren
:
'app/pages/info/info.module#InfoModule'
},
{
path
:
'info'
,
loadChildren
:
'app/pages/info/info.module#InfoModule'
},
{
path
:
'admin'
,
loadChildren
:
'app/pages/info/info.module#InfoModule'
},
{
path
:
'admin'
,
loadChildren
:
'app/pages/admin/admin.module#AdminModule'
},
{
path
:
'user'
,
loadChildren
:
'app/pages/info/info.module#InfoModule'
},
{
path
:
'user'
,
loadChildren
:
'app/pages/user/user.module#UserModule'
},
{
path
:
'login'
,
loadChildren
:
'app/pages/info/info.module#InfoModule'
},
{
path
:
'login'
,
component
:
LoginComponent
},
{
path
:
''
,
pathMatch
:
'full'
,
redirectTo
:
'login'
},
{
path
:
'**'
,
component
:
LoginComponent
}
];
];
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
CommonModule
RouterModule
.
forRoot
(
APP_ROUTES
,
/* {
enableTracing: true, // <-- debugging purposes only
} */
)
],
exports
:
[
RouterModule
],
],
declarations
:
[]
providers
:
[
]
})
})
export
class
AppRoutingModule
{
}
export
class
AppRoutingModule
{
}
code/moya-angular/src/app/app.component.html
View file @
a7951e5
<router-outlet></router-outlet>
<div
id=
"top-container"
>
<div
id=
"left-menu"
>
<router-outlet
name=
"left-menu"
></router-outlet>
</div>
<div
id=
"contentarea"
>
<div
id=
"topbar"
>
<top-menu></top-menu>
</div>
<div
id=
"content"
>
<router-outlet></router-outlet>
</div>
</div>
</div>
code/moya-angular/src/app/app.component.ts
View file @
a7951e5
...
@@ -3,10 +3,8 @@ import {Router} from '@angular/router';
...
@@ -3,10 +3,8 @@ import {Router} from '@angular/router';
declare
var
window
:
any
;
declare
var
window
:
any
;
@
Component
({
@
Component
({
selector
:
'
app
-root'
,
selector
:
'
moya
-root'
,
templateUrl
:
'./app.component.html'
,
templateUrl
:
'./app.component.html'
,
styleUrls
:
[
'./app.component.scss'
]
styleUrls
:
[
'./app.component.scss'
]
})
})
...
@@ -14,11 +12,11 @@ export class AppComponent {
...
@@ -14,11 +12,11 @@ export class AppComponent {
constructor
(
private
router
:
Router
,
private
zone
:
NgZone
)
{
constructor
(
private
router
:
Router
,
private
zone
:
NgZone
)
{
window
.
angularRoute
=
(
url
=>
{
/*
window.angularRoute = (url => {
zone.run(() => {
zone.run(() => {
router.navigateByUrl(url);
router.navigateByUrl(url);
});
});
});
});
*/
}
}
}
}
code/moya-angular/src/app/app.module.ts
View file @
a7951e5
...
@@ -7,7 +7,7 @@ import {ViplistComponent} from './viplist/viplist.component';
...
@@ -7,7 +7,7 @@ import {ViplistComponent} from './viplist/viplist.component';
import
{
AlertModule
}
from
'ngx-bootstrap'
;
import
{
AlertModule
}
from
'ngx-bootstrap'
;
import
{
RouterModule
,
Rout
es
}
from
'@angular/router'
;
import
{
Router
,
RouterModule
,
PreloadAllModul
es
}
from
'@angular/router'
;
import
{
OldMoyaComponent
}
from
'./pages/old-moya/old-moya.component'
;
import
{
OldMoyaComponent
}
from
'./pages/old-moya/old-moya.component'
;
import
{
TestComponent
}
from
'./test/test.component'
;
import
{
TestComponent
}
from
'./test/test.component'
;
import
{
AdminMenuComponent
}
from
'./menu/admin-menu/admin-menu.component'
;
import
{
AdminMenuComponent
}
from
'./menu/admin-menu/admin-menu.component'
;
...
@@ -15,9 +15,6 @@ import {TopMenuComponent} from './menu/top-menu/top-menu.component';
...
@@ -15,9 +15,6 @@ import {TopMenuComponent} from './menu/top-menu/top-menu.component';
import
{
LeftMenuComponent
}
from
'./menu/left-menu/left-menu.component'
;
import
{
LeftMenuComponent
}
from
'./menu/left-menu/left-menu.component'
;
import
{
InfoMenuComponent
}
from
'./menu/info-menu/info-menu.component'
;
import
{
InfoMenuComponent
}
from
'./menu/info-menu/info-menu.component'
;
import
{
UserMenuComponent
}
from
'./menu/user-menu/user-menu.component'
;
import
{
UserMenuComponent
}
from
'./menu/user-menu/user-menu.component'
;
import
{
UserComponent
}
from
'./pages/user/user.component'
;
import
{
InfoComponent
}
from
'./pages/info/info.component'
;
import
{
AdminComponent
}
from
'./pages/admin/admin.component'
;
import
{
HttpClientModule
,
HttpHandler
}
from
'@angular/common/http'
;
import
{
HttpClientModule
,
HttpHandler
}
from
'@angular/common/http'
;
import
{
HttpModule
}
from
'@angular/http'
;
import
{
HttpModule
}
from
'@angular/http'
;
import
{
StaticInjector
}
from
"@angular/core/src/di/injector"
;
import
{
StaticInjector
}
from
"@angular/core/src/di/injector"
;
...
@@ -26,29 +23,18 @@ import {CacheService} from "./shared/services/cache.service";
...
@@ -26,29 +23,18 @@ import {CacheService} from "./shared/services/cache.service";
import
{
MoyaRestModule
}
from
"./moya-rest"
;
import
{
MoyaRestModule
}
from
"./moya-rest"
;
import
{
SafePipe
}
from
"./shared/pipes/safe.pipe"
;
import
{
SafePipe
}
from
"./shared/pipes/safe.pipe"
;
import
{
AppRoutingModule
}
from
'./app-routing.module'
;
import
{
AppRoutingModule
}
from
'./app-routing.module'
;
import
{
LoginComponent
}
from
'./pages/login/login.component'
;
@
NgModule
({
@
NgModule
({
declarations
:
[
declarations
:
[
AppComponent
,
SafePipe
,
RouterModule
,
LoginComponent
,
ViplistComponent
,
AppComponent
OldMoyaComponent
,
TestComponent
,
TopMenuComponent
,
LeftMenuComponent
,
AdminMenuComponent
,
InfoMenuComponent
,
UserMenuComponent
,
UserComponent
,
InfoComponent
,
AdminComponent
,
SafePipe
],
],
imports
:
[
imports
:
[
BrowserModule
,
AppRoutingModule
,
AppRoutingModule
,
CommonModule
,
CommonModule
,
BrowserModule
,
FormsModule
,
FormsModule
,
HttpClientModule
,
HttpClientModule
,
AlertModule
.
forRoot
(),
AlertModule
.
forRoot
(),
...
@@ -58,4 +44,7 @@ import { AppRoutingModule } from './app-routing.module';
...
@@ -58,4 +44,7 @@ import { AppRoutingModule } from './app-routing.module';
bootstrap
:
[
AppComponent
]
bootstrap
:
[
AppComponent
]
})
})
export
class
AppModule
{
export
class
AppModule
{
constructor
(
router
:
Router
)
{
console
.
log
(
'Routes: '
,
JSON
.
stringify
(
router
.
config
,
undefined
,
2
));
}
}
}
code/moya-angular/src/index.html
View file @
a7951e5
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
</head>
</head>
<head>
Hello you are at moya!
</head>
<body>
<body>
<
app-root>
Welcome to new MOYA
</app
-root>
<
moya-root>
Welcome to new MOYA
</moya
-root>
</body>
</body>
</html>
</html>
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