Skip to content

error footer#4

Open
giulitruant wants to merge 2 commits intoutnfrrottads:todo-list-exercisefrom
giulitruant:todo-list-exercise
Open

error footer#4
giulitruant wants to merge 2 commits intoutnfrrottads:todo-list-exercisefrom
giulitruant:todo-list-exercise

Conversation

@giulitruant
Copy link
Copy Markdown

tal y como hablamos profe, le hago la PR para que me pueda ayudar con el footer que no me llegan los parametros de entrada al componente y no puedo mostrar la cantidad de tareas completas y pendientes....

Comment thread src/app/todo-app/todo-app.component.ts Outdated
onItemStateChanged(item: TodoItem) {
onItemStateChanged(item: TodoItem) {
item.toggleCompleted();
if(item.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.

no es bueno estar calculando los contadores aca, te convendria recorrer toda la coleccion y ver cuantos hay de cada uno cada vez

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.

eso te simplificaria toda la logfica, ademas la logica de conteo deberia estar en el footer no aca

export class TodoFooterComponent implements OnInit {

// @Input() listChanged = [];
@Input() completed: any;
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.

yo le pasaria la lista cada vez que cambia y aca con dos funciones mostraria cuantos hay de cada uno,fijate en el otro PR que hay que le dije lo mismo

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.

OscarDorronzoro added a commit to OscarDorronzoro/angular9-example that referenced this pull request Sep 14, 2020
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