teiler / web.teiler.io

A JS web client for teiler.io.
https://web.teiler.io
MIT License
3 stars 0 forks source link

SASS fixes #66

Closed thde closed 7 years ago

thde commented 7 years ago

@tk-codes could you help me with toggeling a class in suggested payments? currently all classes are toggeled when clicking on "Paid". Although only the clicked element should be toggeled.

@tk-codes Do you know how I can link to the current URL on the dashboard?

tk-codes commented 7 years ago

@thde Current Url: Use [routerLink]="" instead of href.

Toggling class for a specific element: You need to have a variable or condition to differentiate the state. Instead of having one attribute saved: boolean, I would use an array isPaid: boolean[]. Then you can use the [ngClass] directive as shown below.

[ngClass]="{'success': isPaid[i]}"

One more thing. At the beginning, all buttons have the text paid. I would change it to pay. Just when you click on pay, the state should be changed to paid. It can also be done with the isPaid array.

thde commented 7 years ago

@thde only i can do that :D

thde commented 7 years ago

@tk-codes both worked. thanks!

@tk-codes & @lroellin please review

thde commented 7 years ago

@tk-codes looks great. thanks