/frontend/todo/src/app/list-todos/list-todos.component.ts
export class ListTodosComponent implements OnInit {
- todos: Todo[]
+ todos: Todo[] = [];
- message: string
+ message: string = '';
- deleteTodo(id) {
+ deleteTodo(id: number) {
- updateTodo(id) {
+ updateTodo(id: number) {
/frontend/todo/src/app/menu/menu.component.ts
export class MenuComponent implements OnInit {
- constructor(private hardcodedAuthenticationService: HardcodedAuthenticationService) { }
+ constructor(public hardcodedAuthenticationService : HardcodedAuthenticationService) { }
/frontend/todo/src/app/service/basic-authentication.service.ts
- executeJWTAuthenticationService(username, password) {
+ executeJWTAuthenticationService(username: string, password: string) {
- executeAuthenticationService(username, password) {
+ executeAuthenticationService(username: string, password: string) {
getAuthenticatedToken() {
if (this.getAuthenticatedUser())
return sessionStorage.getItem(TOKEN)
+ return null
}
/frontend/todo/src/app/service/data/todo-data.service.ts
- retrieveAllTodos(username) {
+ retrieveAllTodos(username: string) {
- deleteTodo(username, id){
+ deleteTodo(username: string, id: number) {
- retrieveTodo(username, id){
+ retrieveTodo(username: string, id: number) {
- updateTodo(username, id, todo){
+ updateTodo(username: string, id: number, todo: Todo) {
- createTodo(username, todo){
+ createTodo(username: string, todo: Todo) {
/frontend/todo/src/app/service/data/welcome-data.service.ts
- executeHelloWorldServiceWithPathVariable(name) {
+ executeHelloWorldServiceWithPathVariable(name: string) {
/frontend/todo/src/app/service/hardcoded-authentication.service.ts
- authenticate(username, password) {
+ authenticate(username: string, password: string) {
/frontend/todo/src/app/todo/todo.component.ts
export class TodoComponent implements OnInit {
- id:number
- todo: Todo
+ id: number = 0;
+ todo: Todo = new Todo(this.id, '', false, new Date());
/frontend/todo/src/app/welcome/welcome.component.ts
export class WelcomeComponent implements OnInit {
- welcomeMessageFromService:string
+ welcomeMessageFromService: string = ''
- handleSuccessfulResponse(response){
+ handleSuccessfulResponse(response: any) {
- handleErrorResponse(error) {
+ handleErrorResponse(error: any) {