Skip to content

Tarea de angular input y output utilizando bootstrap#35

Open
gentilcoreac wants to merge 1 commit intoutnfrrottads:masterfrom
gentilcoreac:tareaACG
Open

Tarea de angular input y output utilizando bootstrap#35
gentilcoreac wants to merge 1 commit intoutnfrrottads:masterfrom
gentilcoreac:tareaACG

Conversation

@gentilcoreac
Copy link
Copy Markdown

Tarea de angular input y output utilizando bootstrap

<app-todo-form (add)="onTodoItemCreated($event)"></app-todo-form>

<app-todo-list
*ngIf="list.length>0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pongamos espacios entre los operadores

ngOnInit(): void {
}

CountTask(){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

los metodos en ts/js van con minuscula, fijate la guia de airbnb de la catedra

}

CountCompletedTask(){
var count = 0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

en ts/js moderno > es6, usemos let y constt en vez de var

CountCompletedTask(){
var count = 0;
for(var i = 0; i < this.list.length; ++i){
if(this.list[i].isCompleted)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

para contar esto podes usar Arrayy.reduce es un metodo interesante

export class TodoFormComponent implements OnInit {

@Output() add = new EventEmitter<any>();
constructor() { }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eliminemos metodos vacios antes de mandar el PR

@@ -0,0 +1,59 @@
<!--
<ul class="list-group">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codigo comentado debe eliminarse

// }
// deleteItem(item: TodoItem){
// this.list.splice(item.id,1);
// }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mismo, comentado y vacio => KILLL

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solo confuinde al que lee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants