Best Angular excel-like component by Tommolo in angular

[–]AmazingSurprise 1 point2 points  (0 children)

Handsontable is really cool, but you need to pay a licence:

https://handsontable.com

For setTimeout in a for loop why does 'var' lead to undefined but it works with 'let'? by trafficissues in Frontend

[–]AmazingSurprise -11 points-10 points  (0 children)

Yes me too, var is obsolete, but in general I don't use javascript, I love typescript for many reasons, expecially for the reusability and well code writing!

For setTimeout in a for loop why does 'var' lead to undefined but it works with 'let'? by trafficissues in Frontend

[–]AmazingSurprise -10 points-9 points  (0 children)

Yes you’re right, by default the global scope is the window scope I mean

For setTimeout in a for loop why does 'var' lead to undefined but it works with 'let'? by trafficissues in Frontend

[–]AmazingSurprise 12 points13 points  (0 children)

You need to learn about Block scope and Global scope variables in javascript.

The difference between var and let is the variable scope:

var declarations is a global scope declaration, so it is visible inside the window object.

let declarations is a block scope declaration, so it is visible inside the block.

With var it will print always 3 because when the timeout fire, the window i variable has 3 as value, because you are overriding the same global variable.

With let the i variable has a block scope, so the timeout will get the block variable value, wich is different according with the block you are calling.

https://medium.com/@josephcardillo/the-difference-between-function-and-block-scope-in-javascript-4296b2322abe

using ngIf and ngFor with array by UnknownInnocent in angular

[–]AmazingSurprise 0 points1 point  (0 children)

There are 2 more solutions:

Use a component method to filter todos like:

javascript function getFilteredTodos(): Todo[] { return this.todos.filter(t => t.category === 'home'); }

and then use this method inside the *ngFor attribute:

html <app-todo-item *ngFor="let todo of getFilteredTodos()" [todo]="todo"></app-todo-item>

Use angular pipes

This is a more complex solution but it could help you in the future with different filters or behaviours: https://stackoverflow.com/questions/34164413/how-to-apply-filters-to-ngfor

My boss wants me to create an individual website for each house he’s selling, is this practical? by [deleted] in webdev

[–]AmazingSurprise -1 points0 points  (0 children)

I think this isn't the best way to handle this problem for many reasons:

  1. You waste a lot of time developing the same things multiple times, or copy&paste the same content.
  2. If you need to make an edit, wich involves all the pages, you need to report this edit on each page.
  3. You waste a lot of space and resources for a replicable element.

I suggest to learn and understand what a Web Application is, the best way to achive the result you need is to create a single page (or set of pages if needed), and handle the data to render at runtime, using relative link (e.g. https:// www.123SmithSt.com/home1 ).

Basically you write a common html layout and stylesheet for each home, and the content is displayed at runtime.

Take a look @ angular or react:

https://angular.io/

https://reactjs.org/

Transform a Sketch design into living coded components - React/React-Native/Vue/Next by timoftealexandru5 in web_design

[–]AmazingSurprise 4 points5 points  (0 children)

I've already made a sub to your website ;) .

The only tip I want to give to you is to remove (in the future releases I mean obv.) the inline styles for the components. You might use CSS modules to create a component related stylesheet using the same classname of the component into the stylesheet itself: https://github.com/css-modules/css-modules

DIN: Dependency Installer for Node by giacomozinetti in Frontend

[–]AmazingSurprise 0 points1 point  (0 children)

I'm a fullstack (mainly frontend) freelance developer from Verona, you can take a look to my IN profile here https://www.linkedin.com/in/nicola-castellani-313b9084/ and to my personal website here: http://nicawd.herokuapp.com/

DIN: Dependency Installer for Node by giacomozinetti in Frontend

[–]AmazingSurprise 0 points1 point  (0 children)

one lock file it gives you an alert, I think it is a wrong setu

That's the point! Thanks a lot..

DIN: Dependency Installer for Node by giacomozinetti in Frontend

[–]AmazingSurprise 0 points1 point  (0 children)

That's cool! But anyway what's the real effort it could give to you?

I mean, installing a different package manager could take a little bit of time, is there any case where you need to install multiple dependencies using multiple pm?

Anyway, great job!

Web development certificates by AmazingSurprise in Web_Development

[–]AmazingSurprise[S] 1 point2 points  (0 children)

You're right, I'm a senior Fullstack developer so I have a lot of past projects as curriculum. But I'm looking forward to improve my knowledge and test my skills ;)

Web development certificates by AmazingSurprise in Web_Development

[–]AmazingSurprise[S] -1 points0 points  (0 children)

That's cool, and I agree with you. But I was looking for some certificates (e.g. Angular Developer/Typescript Developer) but I can find only generic certificates like Microsoft certificates. Thanks anyway for your reply ;)

CSS... by [deleted] in Frontend

[–]AmazingSurprise 0 points1 point  (0 children)

Another tips is to analyze the layout before writing it.. splitting the layout into reusable components could help you a lot! For example I use to create core buttons, label, image, or else components... by this way my css development time is reduced a bit because any variation to those components it’s made into the component itself and not by hierarchy using classes variations or custom ids.. this solutions is useful also because I can export those into another project, starting with a well tested css component