Skip to content
Advertisement

Tag: ecmascript-6

When should I set localStorage in Angular?

I have a list of employee list on EmployeesComponent and there is “Education Overview” and “Salary Overview” buttons for each records. When I click one of the overview button it goes to the OverviewComponent first and then load the correponding component (salary or education) into this OverviewComponent. There is also a “Back” button on each of these salary and education

Vue.js Can not see data in console.log

Today I have to debug my todo App, but can’t see the todo array elements in console.log Code: I tried to do it in Parent and child components, but both didn’t work, even if I try this.todos. Also got an undefined message: Can someone help me out? Thanks in advance Answer Make deleteTodo as a normal function, rather than arrow

javascript Set with objects

When merging array of strings, I can use Set and ES6 to remove duplicates like so: But how do I compare and remove objects? Say I have this: How do I remove {id: “123”, name: “Hi”} from a combined array with Set? Answer Use a Map to deduplicate by the key name: Note that deduplicating only by name will remove

Advertisement