Angular 9 Tutorial For Beginners #16 - NgClass

Angular 9 Tutorial For Beginners #16 - NgClass

ARCTutorials

4 года назад

30,014 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@MomLifeJournal
@MomLifeJournal - 04.11.2023 18:34

Thank you ..

Ответить
@kishoredeshpande3948
@kishoredeshpande3948 - 18.01.2023 09:27

Hi, currently I'm using ngClass to highlight the table row when a row is clicked.
now if I click the same row I want to remove the ngClass applied, i.e. remove highlighting on row
Pls help me out with this


<td [ngClass]="{'data-selected': rowClickId === data.trade_id}">{{data.obl_region}}</td>

Ответить
@SaiKumar-jm9ww
@SaiKumar-jm9ww - 18.01.2023 01:31

Hi Sir, What is the use of ngStyle or ngClass When we have component.css to style?

Ответить
@ousmanefofana4495
@ousmanefofana4495 - 30.09.2022 00:22

Awsome

Ответить
@puttypg8264
@puttypg8264 - 22.03.2022 13:17

Could u please show us how work on stories by using angular

Ответить
@shivamagarwal4520
@shivamagarwal4520 - 03.11.2021 19:44

Hi,

I tried ngClass expression with dynamic parameters, but it is not working.

Not Working (No css is applied, just simple text is shown clsName='one', clsName='two')
<div [ngClass] = "{ clsName:true, clsName2:false }">
Learning ngClass with expression
</div>

Working
<div [ngClass] = "{ 'one':true , 'two':false }">
Learning ngClass with expression
</div>

Ответить
@salluridilip3802
@salluridilip3802 - 01.10.2021 04:47

Thank you so much sir lots of tutorials I searched in you Tube. But I am satisfied and I am able to understand it thank you so much

Ответить
@coolaman49
@coolaman49 - 23.09.2021 09:26

Can we give ngClass and class like this
Ex <div class="one" [ngClass]='{'two': true}">
???

Ответить
@amannavasap2298
@amannavasap2298 - 18.09.2021 08:29

The notes are really helpful...helped a lot!!!

Ответить
@Lost1nTranslation
@Lost1nTranslation - 19.08.2021 07:45

Nice video, thank you!

Ответить
@gowrinath2254
@gowrinath2254 - 26.07.2021 23:36

Thanks sir,

Ответить
@vaishaliramasamy8232
@vaishaliramasamy8232 - 30.04.2021 06:58

Hi bro send me mail id and no,I have doubt

Ответить
@vaishaliramasamy8232
@vaishaliramasamy8232 - 30.04.2021 06:56

Superb,

Ответить
@CodeWithJamil786
@CodeWithJamil786 - 21.04.2021 12:45

Sir i have a problem could you help me plz

Ответить
@rajutalari9420
@rajutalari9420 - 21.03.2021 16:18

very very good brother👌

Ответить
@pavankumar-hd8lv
@pavankumar-hd8lv - 11.03.2021 14:06

Excellent tutorial.Hatsoff to you

Ответить
@mithileshpandey9885
@mithileshpandey9885 - 24.02.2021 16:43

How to Access/Use/ Call Stored Procedure in Entity Framework Core 3.1 using Database First Approach C# ?.........

Ответить
@josbexerr5166
@josbexerr5166 - 12.01.2021 23:15

Excelente gran maestro....gracias saludos desde los andes peruanos

Ответить
@shishirdkm
@shishirdkm - 02.12.2020 04:29

You are the best teacher available on online platforms

Ответить
@ponvarshini9621
@ponvarshini9621 - 25.11.2020 08:42

Hi bro, How to change div color by using ngClass with Boolean condition based on particular url page. Can u help me to perform the above task in html and typescript.

Ответить
@josbexerr5166
@josbexerr5166 - 08.10.2020 03:25

excelente....

Ответить
@conventionalfusion6416
@conventionalfusion6416 - 23.08.2020 14:59

Extremely difficult extremely important extremely puss

Ответить
@srikanthambaldhage2268
@srikanthambaldhage2268 - 14.08.2020 21:16

Thankyou Sridhar sir

Ответить
@adapass
@adapass - 02.08.2020 18:25

Nice article.

Ответить
@sreenuksr
@sreenuksr - 30.07.2020 20:20

notes of this session

- ngClass is is directive which is used to set the class name for DOM elements
- [ngClass]=""
- Examples:
- simple using static class name
<div [ngClass]='one'>Example Of ngClass</div>
- dynamic- from the component
<div [ngClass]='clsOne'>Example Of ngClass</div>
- array classes - to pass more than 1 class - we use an array
<div [ngClass]="[clsOne,clsTwo]">Example Of ngClass</div>
- ngClass with expressions to true or false
<div [ngClass]="{'one':false,'two':true}">Example Of ngClass</div>

Ответить
@EzeWaffle
@EzeWaffle - 06.07.2020 13:03

Hi,
I started following your tutorial a week ago and it's really nice !
I've started typing my own notes (roughly the same thing as you), but lost the file.
Is there any way you could share the notes file you've been writing during these videos somewhere so we could keep it as a cheatsheet ?
Thanks for everything and keep up the good work !

Ответить
@mp-fg2zw
@mp-fg2zw - 27.06.2020 20:50

useful topic..thanks

Ответить
@artisticallyfoodie
@artisticallyfoodie - 17.06.2020 23:08

What is the difference between Ngclass and NgStyle. I think both are giving same feature?

Ответить