Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sprint-boot-front
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
faby
sprint-boot-front
Commits
9b869702
Commit
9b869702
authored
Feb 20, 2019
by
faby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
front
parent
1c29ce9e
Changes
43
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
705 additions
and
21 deletions
+705
-21
app-routing.module_20190219081630.ts
.history/src/app/app-routing.module_20190219081630.ts
+10
-0
app-routing.module_20190219224255.ts
.history/src/app/app-routing.module_20190219224255.ts
+16
-0
app.component_20190219081630.html
.history/src/app/app.component_20190219081630.html
+21
-0
app.component_20190219223509.html
.history/src/app/app.component_20190219223509.html
+21
-0
app.component_20190219224255.html
.history/src/app/app.component_20190219224255.html
+21
-0
app.component_20190219224342.html
.history/src/app/app.component_20190219224342.html
+21
-0
app.component_20190219225515.html
.history/src/app/app.component_20190219225515.html
+21
-0
app.component_20190219225608.html
.history/src/app/app.component_20190219225608.html
+21
-0
crear.component_20190219223301.html
.history/src/app/crear/crear.component_20190219223301.html
+3
-0
crear.component_20190219225101.html
.history/src/app/crear/crear.component_20190219225101.html
+29
-0
crear.component_20190219225159.html
.history/src/app/crear/crear.component_20190219225159.html
+29
-0
crear.component_20190219225220.html
.history/src/app/crear/crear.component_20190219225220.html
+29
-0
crear.component_20190219225400.html
.history/src/app/crear/crear.component_20190219225400.html
+29
-0
crear.component_20190219225441.html
.history/src/app/crear/crear.component_20190219225441.html
+22
-0
crear.component_20190219230441.html
.history/src/app/crear/crear.component_20190219230441.html
+28
-0
listar.component_20190219223318.html
.history/src/app/listar/listar.component_20190219223318.html
+3
-0
listar.component_20190219230142.html
.history/src/app/listar/listar.component_20190219230142.html
+30
-0
listar.component_20190219230208.html
.history/src/app/listar/listar.component_20190219230208.html
+32
-0
User_20190219233631.ts
.history/src/app/model/User_20190219233631.ts
+0
-0
User_20190219233655.ts
.history/src/app/model/User_20190219233655.ts
+7
-0
User_20190219233917.ts
.history/src/app/model/User_20190219233917.ts
+8
-0
user.service_20190219233259.ts
.history/src/app/servicie/user.service_20190219233259.ts
+9
-0
user.service_20190219233655.ts
.history/src/app/servicie/user.service_20190219233655.ts
+18
-0
user.service_20190219233935.ts
.history/src/app/servicie/user.service_20190219233935.ts
+19
-0
index_20190219081630.html
.history/src/index_20190219081630.html
+14
-0
index_20190219223800.html
.history/src/index_20190219223800.html
+16
-0
index_20190219225400.html
.history/src/index_20190219225400.html
+16
-0
app-routing.module.ts
src/app/app-routing.module.ts
+7
-1
app.component.html
src/app/app.component.html
+19
-19
app.module.ts
src/app/app.module.ts
+5
-1
crear.component.html
src/app/crear/crear.component.html
+28
-0
crear.component.scss
src/app/crear/crear.component.scss
+0
-0
crear.component.spec.ts
src/app/crear/crear.component.spec.ts
+25
-0
crear.component.ts
src/app/crear/crear.component.ts
+15
-0
listar.component.html
src/app/listar/listar.component.html
+32
-0
listar.component.scss
src/app/listar/listar.component.scss
+0
-0
listar.component.spec.ts
src/app/listar/listar.component.spec.ts
+25
-0
listar.component.ts
src/app/listar/listar.component.ts
+15
-0
User.ts
src/app/model/User.ts
+8
-0
user.service.spec.ts
src/app/servicie/user.service.spec.ts
+12
-0
user.service.ts
src/app/servicie/user.service.ts
+19
-0
noImage.png
src/assets/image/noImage.png
+0
-0
index.html
src/index.html
+2
-0
No files found.
.history/src/app/app-routing.module_20190219081630.ts
0 → 100644
View file @
9b869702
import
{
NgModule
}
from
'@angular/core'
;
import
{
Routes
,
RouterModule
}
from
'@angular/router'
;
const
routes
:
Routes
=
[];
@
NgModule
({
imports
:
[
RouterModule
.
forRoot
(
routes
)],
exports
:
[
RouterModule
]
})
export
class
AppRoutingModule
{
}
.history/src/app/app-routing.module_20190219224255.ts
0 → 100644
View file @
9b869702
import
{
NgModule
}
from
'@angular/core'
;
import
{
Routes
,
RouterModule
}
from
'@angular/router'
;
import
{
CrearComponent
}
from
'./crear/crear.component'
;
import
{
ListarComponent
}
from
'./listar/listar.component'
;
const
routes
:
Routes
=
[
{
path
:
''
,
redirectTo
:
'/create'
,
pathMatch
:
'full'
},
{
path
:
'create'
,
component
:
CrearComponent
},
{
path
:
'listar'
,
component
:
ListarComponent
}
];
@
NgModule
({
imports
:
[
RouterModule
.
forRoot
(
routes
)],
exports
:
[
RouterModule
]
})
export
class
AppRoutingModule
{
}
.history/src/app/app.component_20190219081630.html
0 → 100644
View file @
9b869702
<!--The content below is only a placeholder and can be replaced.-->
<div
style=
"text-align:center"
>
<h1>
Welcome to {{ title }}!
</h1>
<img
width=
"300"
alt=
"Angular Logo"
src=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="
>
</div>
<h2>
Here are some links to help you start:
</h2>
<ul>
<li>
<h2><a
target=
"_blank"
rel=
"noopener"
href=
"https://angular.io/tutorial"
>
Tour of Heroes
</a></h2>
</li>
<li>
<h2><a
target=
"_blank"
rel=
"noopener"
href=
"https://github.com/angular/angular-cli/wiki"
>
CLI Documentation
</a></h2>
</li>
<li>
<h2><a
target=
"_blank"
rel=
"noopener"
href=
"https://blog.angular.io/"
>
Angular blog
</a></h2>
</li>
</ul>
<router-outlet></router-outlet>
.history/src/app/app.component_20190219223509.html
0 → 100644
View file @
9b869702
<nav
class=
"navbar navbar-expand-lg navbar-light bg-light"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"#"
>
ng mysql CRUD
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNav"
aria-controls=
"navbarNav"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarNav"
>
<ul
class=
"navbar-nav ml-auto"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
crear
'
]"
routerLinkActive=
"active"
><i
class=
"fas fa-plus-gamepad"
></i>
Games
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
listar
'
]"
routerLinkActive=
"active"
><i
class=
"fas fa-plus-circle"
></i>
Add Game
</a>
</li>
</ul>
</div>
</div>
</nav>
<router-outlet></router-outlet>
.history/src/app/app.component_20190219224255.html
0 → 100644
View file @
9b869702
<nav
class=
"navbar navbar-expand-lg navbar-light bg-light"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"#"
>
ng mysql CRUD
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNav"
aria-controls=
"navbarNav"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarNav"
>
<ul
class=
"navbar-nav ml-auto"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
create
'
]"
routerLinkActive=
"active"
><i
class=
"fas fa-plus-gamepad"
></i>
Games
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
listar
'
]"
routerLinkActive=
"active"
><i
class=
"fas fa-plus-circle"
></i>
Add Game
</a>
</li>
</ul>
</div>
</div>
</nav>
<router-outlet></router-outlet>
.history/src/app/app.component_20190219224342.html
0 → 100644
View file @
9b869702
<nav
class=
"navbar navbar-expand-lg navbar-light bg-light"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"#"
>
SPRING CRUD
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNav"
aria-controls=
"navbarNav"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarNav"
>
<ul
class=
"navbar-nav ml-auto"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
create
'
]"
routerLinkActive=
"active"
><i
class=
"fas fa-plus-gamepad"
></i>
Games
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
listar
'
]"
routerLinkActive=
"active"
><i
class=
"fas fa-plus-circle"
></i>
Add Game
</a>
</li>
</ul>
</div>
</div>
</nav>
<router-outlet></router-outlet>
.history/src/app/app.component_20190219225515.html
0 → 100644
View file @
9b869702
<nav
class=
"navbar navbar-expand-lg navbar-light bg-light"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"#"
>
SPRING CRUD
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNav"
aria-controls=
"navbarNav"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarNav"
>
<ul
class=
"navbar-nav ml-auto"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
create
'
]"
routerLinkActive=
"active"
><i
class=
"fas fa-plus-gamepad"
></i>
Crear
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
listar
'
]"
routerLinkActive=
"active"
><i
class=
"fas fa-plus-circle"
></i>
Listar
</a>
</li>
</ul>
</div>
</div>
</nav>
<router-outlet></router-outlet>
.history/src/app/app.component_20190219225608.html
0 → 100644
View file @
9b869702
<nav
class=
"navbar navbar-expand-lg navbar-light bg-light"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"#"
>
SPRING CRUD
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNav"
aria-controls=
"navbarNav"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarNav"
>
<ul
class=
"navbar-nav ml-auto"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
create
'
]"
routerLinkActive=
"active"
><i
class=
"fas fa-plus-circle"
></i>
Crear
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
listar
'
]"
routerLinkActive=
"active"
><i
class=
""
></i>
Listar
</a>
</li>
</ul>
</div>
</div>
</nav>
<router-outlet></router-outlet>
.history/src/app/crear/crear.component_20190219223301.html
0 → 100644
View file @
9b869702
<p>
crear works!
</p>
.history/src/app/crear/crear.component_20190219225101.html
0 → 100644
View file @
9b869702
<div
class=
"col-md-4 offset-md-2"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
action=
""
>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"Title"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<textarea
name=
"description"
placeholder=
"Description"
id=
""
rows=
"2"
class=
"form-control"
></textarea>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"image"
placeholder=
"Image"
class=
"form-control"
autofocus
>
</div>
<button
class=
"btn btn-success btn-block"
>
SAve
</button>
</form>
</div>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"card card-body text-center"
>
<img
src=
"../../assets/image/noImage.png"
alt=
""
class=
"card-img-top"
>
<h3></h3>
<p></p>
<p></p>
</div>
</div>
.history/src/app/crear/crear.component_20190219225159.html
0 → 100644
View file @
9b869702
<div
class=
"col-md-4 offset-md-2"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
action=
""
>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"Title"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<textarea
name=
"description"
placeholder=
"Description"
id=
""
rows=
"2"
class=
"form-control"
></textarea>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"image"
placeholder=
"Image"
class=
"form-control"
autofocus
>
</div>
<button
class=
"btn btn-success btn-block"
>
SAve
</button>
</form>
</div>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"card card-body text-center"
>
<img
src=
"../../assets/image/noImage.png"
alt=
""
class=
"card-img-top"
height=
"50"
>
<h3></h3>
<p></p>
<p></p>
</div>
</div>
.history/src/app/crear/crear.component_20190219225220.html
0 → 100644
View file @
9b869702
<div
class=
"col-md-4 offset-md-2"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
action=
""
>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"Title"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<textarea
name=
"description"
placeholder=
"Description"
id=
""
rows=
"2"
class=
"form-control"
></textarea>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"image"
placeholder=
"Image"
class=
"form-control"
autofocus
>
</div>
<button
class=
"btn btn-success btn-block"
>
SAve
</button>
</form>
</div>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"card card-body text-center"
>
<img
src=
"../../assets/image/noImage.png"
alt=
""
class=
"card-img-top"
height=
"50"
width=
"50"
>
<h3></h3>
<p></p>
<p></p>
</div>
</div>
.history/src/app/crear/crear.component_20190219225400.html
0 → 100644
View file @
9b869702
<div
class=
"col-md-4 offset-md-2"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
action=
""
>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"Title"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<textarea
name=
"description"
placeholder=
"Description"
id=
""
rows=
"2"
class=
"form-control"
></textarea>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"image"
placeholder=
"Image"
class=
"form-control"
autofocus
>
</div>
<button
class=
"btn btn-success btn-block"
>
SAve
</button>
</form>
</div>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"card card-body text-center"
>
<img
src=
"../../assets/image/noImage.png"
alt=
""
class=
"card-img-top"
>
<h3></h3>
<p></p>
<p></p>
</div>
</div>
.history/src/app/crear/crear.component_20190219225441.html
0 → 100644
View file @
9b869702
<div
class=
"col-md-4 offset-md-2"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
action=
""
>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"Title"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<textarea
name=
"description"
placeholder=
"Description"
id=
""
rows=
"2"
class=
"form-control"
></textarea>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"image"
placeholder=
"Image"
class=
"form-control"
autofocus
>
</div>
<button
class=
"btn btn-success btn-block"
>
SAve
</button>
</form>
</div>
</div>
</div>
.history/src/app/crear/crear.component_20190219230441.html
0 → 100644
View file @
9b869702
<div
class=
"col-md-4 offset-md-2"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
action=
""
>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"Nombre"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"Apellido"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"salida destino"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"llegada destino"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<input
type=
"date"
name=
"title"
class=
"form-control"
autofocus
>
</div>
<button
class=
"btn btn-success btn-block"
>
SAve
</button>
</form>
</div>
</div>
</div>
.history/src/app/listar/listar.component_20190219223318.html
0 → 100644
View file @
9b869702
<p>
listar works!
</p>
.history/src/app/listar/listar.component_20190219230142.html
0 → 100644
View file @
9b869702
<table
class=
"table table-striped table-dark"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
First
</th>
<th
scope=
"col"
>
Last
</th>
<th
scope=
"col"
>
Handle
</th>
</tr>
</thead>
<tbody>
<tr>
<th
scope=
"row"
>
1
</th>
<td>
Mark
</td>
<td>
Otto
</td>
<td>
@mdo
</td>
</tr>
<tr>
<th
scope=
"row"
>
2
</th>
<td>
Jacob
</td>
<td>
Thornton
</td>
<td>
@fat
</td>
</tr>
<tr>
<th
scope=
"row"
>
3
</th>
<td>
Larry
</td>
<td>
the Bird
</td>
<td>
@twitter
</td>
</tr>
</tbody>
</table>
.history/src/app/listar/listar.component_20190219230208.html
0 → 100644
View file @
9b869702
<div
class=
"container"
>
<table
class=
"table table-striped table-dark"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
First
</th>
<th
scope=
"col"
>
Last
</th>
<th
scope=
"col"
>
Handle
</th>
</tr>
</thead>
<tbody>
<tr>
<th
scope=
"row"
>
1
</th>
<td>
Mark
</td>
<td>
Otto
</td>
<td>
@mdo
</td>
</tr>
<tr>
<th
scope=
"row"
>
2
</th>
<td>
Jacob
</td>
<td>
Thornton
</td>
<td>
@fat
</td>
</tr>
<tr>
<th
scope=
"row"
>
3
</th>
<td>
Larry
</td>
<td>
the Bird
</td>
<td>
@twitter
</td>
</tr>
</tbody>
</table>
</div>
.history/src/app/model/User_20190219233631.ts
0 → 100644
View file @
9b869702
.history/src/app/model/User_20190219233655.ts
0 → 100644
View file @
9b869702
export
interface
User
{
id
?:
number
;
title
?:
string
;
description
?:
string
;
image
?:
string
;
created_at
?:
Date
;
}
\ No newline at end of file
.history/src/app/model/User_20190219233917.ts
0 → 100644
View file @
9b869702
export
interface
User
{
id
:
number
;
nombre
:
string
;
apellido
:
string
;
destinoSalida
:
string
;
destinoLlegada
:
string
;
fecha
:
Date
;
}
.history/src/app/servicie/user.service_20190219233259.ts
0 → 100644
View file @
9b869702
import
{
Injectable
}
from
'@angular/core'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
UserService
{
constructor
()
{
}
}
.history/src/app/servicie/user.service_20190219233655.ts
0 → 100644
View file @
9b869702
import
{
Injectable
}
from
'@angular/core'
;
import
{
HttpClient
}
from
'@angular/common/http'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
UserService
{
apiURL
=
'http://localhost:9000'
;
constructor
(
private
http
:
HttpClient
)
{}
getGames
()
{
return
this
.
http
.
get
(
`
${
this
.
apiURL
}
/list`
);
}
saveGame
(
user
:
User
)
{
return
this
.
http
.
post
(
`
${
this
.
apiURL
}
/games`
,
user
);
}
}
.history/src/app/servicie/user.service_20190219233935.ts
0 → 100644
View file @
9b869702
import
{
Injectable
}
from
'@angular/core'
;
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
User
}
from
'../model/User'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
UserService
{
apiURL
=
'http://localhost:9000'
;
constructor
(
private
http
:
HttpClient
)
{}
getGames
()
{
return
this
.
http
.
get
(
`
${
this
.
apiURL
}
/list`
);
}
saveGame
(
user
:
User
)
{
return
this
.
http
.
post
(
`
${
this
.
apiURL
}
/games`
,
user
);
}
}
.history/src/index_20190219081630.html
0 → 100644
View file @
9b869702
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<title>
Client
</title>
<base
href=
"/"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
</head>
<body>
<app-root></app-root>
</body>
</html>
.history/src/index_20190219223800.html
0 → 100644
View file @
9b869702
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<title>
Client
</title>
<base
href=
"/"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
href=
"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity=
"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin=
"anonymous"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
</head>
<body>
<app-root></app-root>
</body>
</html>
.history/src/index_20190219225400.html
0 → 100644
View file @
9b869702
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<title>
Client
</title>
<base
href=
"/"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
href=
"https://bootswatch.com/4/lux/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.7.1/css/all.css"
integrity=
"sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin=
"anonymous"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
</head>
<body>
<app-root></app-root>
</body>
</html>
src/app/app-routing.module.ts
View file @
9b869702
import
{
NgModule
}
from
'@angular/core'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
Routes
,
RouterModule
}
from
'@angular/router'
;
import
{
Routes
,
RouterModule
}
from
'@angular/router'
;
import
{
CrearComponent
}
from
'./crear/crear.component'
;
import
{
ListarComponent
}
from
'./listar/listar.component'
;
const
routes
:
Routes
=
[];
const
routes
:
Routes
=
[
{
path
:
''
,
redirectTo
:
'/create'
,
pathMatch
:
'full'
},
{
path
:
'create'
,
component
:
CrearComponent
},
{
path
:
'listar'
,
component
:
ListarComponent
}
];
@
NgModule
({
@
NgModule
({
imports
:
[
RouterModule
.
forRoot
(
routes
)],
imports
:
[
RouterModule
.
forRoot
(
routes
)],
...
...
src/app/app.component.html
View file @
9b869702
<
!--The content below is only a placeholder and can be replaced.--
>
<
nav
class=
"navbar navbar-expand-lg navbar-light bg-light"
>
<div
style=
"text-align:cent
er"
>
<div
class=
"contain
er"
>
<h1
>
<a
class=
"navbar-brand"
href=
"#"
>
SPRING CRUD
</a
>
Welcome to {{ title }}!
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNav"
aria-controls=
"navbarNav"
</h1
>
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<img
width=
"300"
alt=
"Angular Logo"
src=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="
>
<span
class=
"navbar-toggler-icon"
></span
>
</div
>
</button
>
<h2>
Here are some links to help you start:
</h2
>
<div
class=
"collapse navbar-collapse"
id=
"navbarNav"
>
<ul
>
<ul
class=
"navbar-nav ml-auto"
>
<li
>
<li
class=
"nav-item"
>
<h2><a
target=
"_blank"
rel=
"noopener"
href=
"https://angular.io/tutorial"
>
Tour of Heroes
</a></h2
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
create
'
]"
routerLinkActive=
"active"
><i
class=
"fas fa-plus-circle"
></i>
Crear
</a
>
</li>
</li>
<li
>
<li
class=
"nav-item"
>
<h2><a
target=
"_blank"
rel=
"noopener"
href=
"https://github.com/angular/angular-cli/wiki"
>
CLI Documentation
</a></h2
>
<a
class=
"nav-link"
[
routerLink
]="[
'/
listar
'
]"
routerLinkActive=
"active"
><i
class=
""
></i>
Listar
</a
>
</li>
</li>
<li
>
</ul
>
<
h2><a
target=
"_blank"
rel=
"noopener"
href=
"https://blog.angular.io/"
>
Angular blog
</a></h2
>
<
/div
>
</
li
>
</
div
>
</
ul
>
</
nav
>
<router-outlet></router-outlet>
<router-outlet></router-outlet>
src/app/app.module.ts
View file @
9b869702
...
@@ -3,10 +3,14 @@ import { NgModule } from '@angular/core';
...
@@ -3,10 +3,14 @@ import { NgModule } from '@angular/core';
import
{
AppRoutingModule
}
from
'./app-routing.module'
;
import
{
AppRoutingModule
}
from
'./app-routing.module'
;
import
{
AppComponent
}
from
'./app.component'
;
import
{
AppComponent
}
from
'./app.component'
;
import
{
CrearComponent
}
from
'./crear/crear.component'
;
import
{
ListarComponent
}
from
'./listar/listar.component'
;
@
NgModule
({
@
NgModule
({
declarations
:
[
declarations
:
[
AppComponent
AppComponent
,
CrearComponent
,
ListarComponent
],
],
imports
:
[
imports
:
[
BrowserModule
,
BrowserModule
,
...
...
src/app/crear/crear.component.html
0 → 100644
View file @
9b869702
<div
class=
"col-md-4 offset-md-2"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
action=
""
>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"Nombre"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"Apellido"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"salida destino"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
name=
"title"
placeholder=
"llegada destino"
class=
"form-control"
autofocus
>
</div>
<div
class=
"form-group"
>
<input
type=
"date"
name=
"title"
class=
"form-control"
autofocus
>
</div>
<button
class=
"btn btn-success btn-block"
>
SAve
</button>
</form>
</div>
</div>
</div>
src/app/crear/crear.component.scss
0 → 100644
View file @
9b869702
src/app/crear/crear.component.spec.ts
0 → 100644
View file @
9b869702
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
CrearComponent
}
from
'./crear.component'
;
describe
(
'CrearComponent'
,
()
=>
{
let
component
:
CrearComponent
;
let
fixture
:
ComponentFixture
<
CrearComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
CrearComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
CrearComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/crear/crear.component.ts
0 → 100644
View file @
9b869702
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-crear'
,
templateUrl
:
'./crear.component.html'
,
styleUrls
:
[
'./crear.component.scss'
]
})
export
class
CrearComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
src/app/listar/listar.component.html
0 → 100644
View file @
9b869702
<div
class=
"container"
>
<table
class=
"table table-striped table-dark"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
First
</th>
<th
scope=
"col"
>
Last
</th>
<th
scope=
"col"
>
Handle
</th>
</tr>
</thead>
<tbody>
<tr>
<th
scope=
"row"
>
1
</th>
<td>
Mark
</td>
<td>
Otto
</td>
<td>
@mdo
</td>
</tr>
<tr>
<th
scope=
"row"
>
2
</th>
<td>
Jacob
</td>
<td>
Thornton
</td>
<td>
@fat
</td>
</tr>
<tr>
<th
scope=
"row"
>
3
</th>
<td>
Larry
</td>
<td>
the Bird
</td>
<td>
@twitter
</td>
</tr>
</tbody>
</table>
</div>
src/app/listar/listar.component.scss
0 → 100644
View file @
9b869702
src/app/listar/listar.component.spec.ts
0 → 100644
View file @
9b869702
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
ListarComponent
}
from
'./listar.component'
;
describe
(
'ListarComponent'
,
()
=>
{
let
component
:
ListarComponent
;
let
fixture
:
ComponentFixture
<
ListarComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
ListarComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
ListarComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/listar/listar.component.ts
0 → 100644
View file @
9b869702
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-listar'
,
templateUrl
:
'./listar.component.html'
,
styleUrls
:
[
'./listar.component.scss'
]
})
export
class
ListarComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
src/app/model/User.ts
0 → 100644
View file @
9b869702
export
interface
User
{
id
:
number
;
nombre
:
string
;
apellido
:
string
;
destinoSalida
:
string
;
destinoLlegada
:
string
;
fecha
:
Date
;
}
src/app/servicie/user.service.spec.ts
0 → 100644
View file @
9b869702
import
{
TestBed
}
from
'@angular/core/testing'
;
import
{
UserService
}
from
'./user.service'
;
describe
(
'UserService'
,
()
=>
{
beforeEach
(()
=>
TestBed
.
configureTestingModule
({}));
it
(
'should be created'
,
()
=>
{
const
service
:
UserService
=
TestBed
.
get
(
UserService
);
expect
(
service
).
toBeTruthy
();
});
});
src/app/servicie/user.service.ts
0 → 100644
View file @
9b869702
import
{
Injectable
}
from
'@angular/core'
;
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
User
}
from
'../model/User'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
UserService
{
apiURL
=
'http://localhost:9000'
;
constructor
(
private
http
:
HttpClient
)
{}
getGames
()
{
return
this
.
http
.
get
(
`
${
this
.
apiURL
}
/list`
);
}
saveGame
(
user
:
User
)
{
return
this
.
http
.
post
(
`
${
this
.
apiURL
}
/games`
,
user
);
}
}
src/assets/image/noImage.png
0 → 100644
View file @
9b869702
24.2 KB
src/index.html
View file @
9b869702
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
<base
href=
"/"
>
<base
href=
"/"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
href=
"https://bootswatch.com/4/lux/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.7.1/css/all.css"
integrity=
"sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin=
"anonymous"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
</head>
</head>
<body>
<body>
...
...
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