diff --git a/README.md b/README.md index 8e4c107..36b6782 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # angular-7-registration-login-example Angular 7 User Registration and Login Example with Webpack 4 + +Full tutorial with example available at http://jasonwatmore.com/post/2018/10/29/angular-7-user-registration-and-login-example-tutorial \ No newline at end of file diff --git a/src/app/_services/user.service.ts b/src/app/_services/user.service.ts index 176e9e0..40b24b9 100644 --- a/src/app/_services/user.service.ts +++ b/src/app/_services/user.service.ts @@ -12,7 +12,7 @@ export class UserService { } getById(id: number) { - return this.http.get(`${config.apiUrl}/users/` + id); + return this.http.get(`${config.apiUrl}/users/${id}`); } register(user: User) { @@ -20,10 +20,10 @@ export class UserService { } update(user: User) { - return this.http.put(`${config.apiUrl}/users/` + user.id, user); + return this.http.put(`${config.apiUrl}/users/${user.id}`, user); } delete(id: number) { - return this.http.delete(`${config.apiUrl}/users/` + id); + return this.http.delete(`${config.apiUrl}/users/${id}`); } } \ No newline at end of file diff --git a/src/app/app.component.html b/src/app/app.component.html index 5550245..7290ed7 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -20,6 +20,9 @@
+

+ Angular 7 - User Registration and Login Example & Tutorial +

JasonWatmore.com

diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html index 26353b8..7890b32 100644 --- a/src/app/login/login.component.html +++ b/src/app/login/login.component.html @@ -16,7 +16,7 @@
- - Register + + Register
\ No newline at end of file diff --git a/src/app/register/register.component.html b/src/app/register/register.component.html index 741d44c..959d41d 100644 --- a/src/app/register/register.component.html +++ b/src/app/register/register.component.html @@ -31,7 +31,7 @@
- - Cancel + + Cancel