Hey Lars.
I made a similar button within a DS based on bootstrap, but I managed to only use classes, so no ngIf. I don't feel alright with this code repetition you present, but I must say that I rarely work with material except for cdk.
Cheers.
Alain
Hey Alain,
Thanks for your comment. If I might make one remark, the repetition is my "fault", not Lars' :)
I fully agree that the solution presented so far is not a good one. I wanted to start with something simple and gradually work my way out to a better solution. (In a sense, show how I would've solved the problem).
For me, the main difference between Material and Bootstrap is that Material is using Directives, which cannot be applied dynamically, whereas Bootstrap is using classes (like you mention as well). So in part 2, I'm going to try a different solution that removes the repetition.
Awesome, I knew it was yours actually, since I did see tat code on twitter, but I was confused :)
I see what you mean indeed, and I'm curious about the solution you come up with !
Great talk anyway, thank you for the explanations :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey Lars.
I made a similar button within a DS based on bootstrap, but I managed to only use classes, so no ngIf. I don't feel alright with this code repetition you present, but I must say that I rarely work with material except for cdk.
Cheers.
Alain
Hey Alain,
Thanks for your comment. If I might make one remark, the repetition is my "fault", not Lars' :)
I fully agree that the solution presented so far is not a good one. I wanted to start with something simple and gradually work my way out to a better solution. (In a sense, show how I would've solved the problem).
For me, the main difference between Material and Bootstrap is that Material is using Directives, which cannot be applied dynamically, whereas Bootstrap is using classes (like you mention as well). So in part 2, I'm going to try a different solution that removes the repetition.
Awesome, I knew it was yours actually, since I did see tat code on twitter, but I was confused :)
I see what you mean indeed, and I'm curious about the solution you come up with !
Great talk anyway, thank you for the explanations :)