Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
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 77549f1c
authored
Feb 05, 2017
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inital test done
1 parent
252a284d
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
141 additions
and
7 deletions
code/moya-angular/README.md
code/moya-angular/angular-cli.json
code/moya-angular/package.json
code/moya-angular/pom.xml
code/moya-angular/src/app/app.component.html
code/moya-angular/src/app/app.module.ts
code/moya-angular/src/app/viplist/viplist.component.css
code/moya-angular/src/app/viplist/viplist.component.html
code/moya-angular/src/app/viplist/viplist.component.spec.ts
code/moya-angular/src/app/viplist/viplist.component.ts
code/moya-ear/pom.xml
code/moya-web/WebContent/angular.xhtml
code/moya-angular/README.md
View file @
77549f1
# MoyaAngular
# devausnoteja (tmp ohjeet)
`ng build --output-path=../moya-ear/target/moya-ear-1.2-SNAPSHOT/moya-web-1.2-SNAPSHOT.war/resources/angular-dist/`
# MoyaAngular, generoidut ohjeet
This project was generated with
[
angular-cli
](
https://github.com/angular/angular-cli
)
version 1.0.0-beta.24.
...
...
code/moya-angular/angular-cli.json
View file @
77549f1
...
...
@@ -18,7 +18,8 @@
"prefix"
:
"app"
,
"mobile"
:
false
,
"styles"
:
[
"styles.css"
"styles.css"
,
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts"
:
[],
"environments"
:
{
...
...
code/moya-angular/package.json
View file @
77549f1
...
...
@@ -21,7 +21,10 @@
"@angular/platform-browser"
:
"^2.3.1"
,
"@angular/platform-browser-dynamic"
:
"^2.3.1"
,
"@angular/router"
:
"^3.3.1"
,
"bootstrap"
:
"^4.0.0-alpha.6"
,
"core-js"
:
"^2.4.1"
,
"ng2-bootstrap"
:
"^1.3.3"
,
"node-sass"
:
"^4.5.0"
,
"rxjs"
:
"^5.0.1"
,
"ts-helpers"
:
"^1.1.1"
,
"zone.js"
:
"^0.7.2"
...
...
@@ -39,9 +42,12 @@
"karma-cli"
:
"^1.0.1"
,
"karma-jasmine"
:
"^1.0.2"
,
"karma-remap-istanbul"
:
"^0.2.1"
,
"node-sass"
:
"^4.5.0"
,
"protractor"
:
"~4.0.13"
,
"raw-loader"
:
"^0.5.1"
,
"sass-loader"
:
"^4.1.1"
,
"ts-node"
:
"1.2.1"
,
"tslint"
:
"^4.0.2"
,
"typescript"
:
"~2.
0.3
"
"typescript"
:
"~2.
1.5
"
}
}
code/moya-angular/pom.xml
View file @
77549f1
...
...
@@ -2,4 +2,7 @@
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
moya-angular
</artifactId>
<groupId>
fi.codecrew.moya.angular
</groupId>
<version>
0.001
</version>
</project>
code/moya-angular/src/app/app.component.html
View file @
77549f1
<h1>
{{title}}
VIPLIST
</h1>
<moya-viplist>
Loading viplist
</moya-viplist>
code/moya-angular/src/app/app.module.ts
View file @
77549f1
...
...
@@ -4,15 +4,21 @@ import { FormsModule } from '@angular/forms';
import
{
HttpModule
}
from
'@angular/http'
;
import
{
AppComponent
}
from
'./app.component'
;
import
{
ViplistComponent
}
from
'./viplist/viplist.component'
;
import
{
AlertModule
}
from
"ng2-bootstrap"
;
import
{
MoyaRestModule
}
from
"./moya-rest/moya-rest.module"
;
@
NgModule
({
declarations
:
[
AppComponent
AppComponent
,
ViplistComponent
],
imports
:
[
BrowserModule
,
FormsModule
,
HttpModule
HttpModule
,
AlertModule
.
forRoot
(),
MoyaRestModule
.
forRoot
()
],
providers
:
[],
bootstrap
:
[
AppComponent
]
...
...
code/moya-angular/src/app/viplist/viplist.component.css
0 → 100644
View file @
77549f1
File mode changed
code/moya-angular/src/app/viplist/viplist.component.html
0 → 100644
View file @
77549f1
<table
class=
"table table-striped table-hover"
>
<thead>
<tr>
<th>
Description
</th>
<th>
shortdesc
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let vip of vips | async"
>
<td>
{{vip.description}}
</td>
<td>
{{vip.shortdescr}}
</td>
<td>
<div>
<div
*
ngFor=
"let p of vip.products"
>
<div
style=
"display: inline-block;"
>
{{p.name}}
</div>
<div
style=
"display: inline-block;"
>
{{p.quantity}}
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
code/moya-angular/src/app/viplist/viplist.component.spec.ts
0 → 100644
View file @
77549f1
/* 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
{
ViplistComponent
}
from
'./viplist.component'
;
describe
(
'ViplistComponent'
,
()
=>
{
let
component
:
ViplistComponent
;
let
fixture
:
ComponentFixture
<
ViplistComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
ViplistComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
ViplistComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
code/moya-angular/src/app/viplist/viplist.component.ts
0 → 100644
View file @
77549f1
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ViplistService
}
from
"../moya-rest/services/viplist.service"
;
import
{
Observable
}
from
"rxjs"
;
import
{
Vip
}
from
"../moya-rest/models/vip.model"
;
@
Component
({
selector
:
'moya-viplist'
,
templateUrl
:
'./viplist.component.html'
,
styleUrls
:
[
'./viplist.component.css'
]
})
export
class
ViplistComponent
implements
OnInit
{
vips
:
Observable
<
Array
<
Vip
>>
;
constructor
(
private
viplistService
:
ViplistService
)
{
}
ngOnInit
()
{
this
.
viplistService
.
get
();
}
}
code/moya-ear/pom.xml
View file @
77549f1
...
...
@@ -102,7 +102,7 @@
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-ear-plugin
</artifactId>
<configuration>
<unpackTypes>
war,ejb
,jar
</unpackTypes>
<unpackTypes>
war,ejb
</unpackTypes>
</configuration>
</plugin>
</plugins>
...
...
code/moya-web/WebContent/angular.xhtml
0 → 100644
View file @
77549f1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
>
<h:head>
<title></title>
</h:head>
<h:body>
<ui:composition
template=
"#{sessionHandler.template}"
>
<ui:define
name=
"headerdata"
>
<base
href=
"/MoyaWeb/resources/angular-dist/"
></base>
</ui:define>
<ui:define
name=
"content"
>
<link
rel=
"stylesheet"
href=
"/MoyaWeb/resources/angular-dist/styles.bundle.css"
/>
<app-root>
Lattaillaans
</app-root>
<script
type=
"text/javascript"
src=
"/MoyaWeb/resources/angular-dist/inline.bundle.js"
></script>
<script
type=
"text/javascript"
src=
"/MoyaWeb/resources/angular-dist/vendor.bundle.js"
></script>
<script
type=
"text/javascript"
src=
"/MoyaWeb/resources/angular-dist/main.bundle.js"
></script>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
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