Vue JS 2 Tutorial #10 - Dynamic CSS Classes

Vue JS 2 Tutorial #10 - Dynamic CSS Classes

Net Ninja

7 лет назад

163,391 Просмотров

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


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

Shlomi Yahbes
Shlomi Yahbes - 03.09.2023 13:26

wow.. thanks

Ответить
TailwindProgramming
TailwindProgramming - 22.12.2022 15:28

Dobra robota panie Nindża

Ответить
Marianne Hartigan
Marianne Hartigan - 02.11.2022 04:14

Is there any way to assign a class name using the object id from the database? So a div would have a class that equals a value from the database, not just booleans.

Ответить
_A-G_
_A-G_ - 12.11.2021 03:40

I was at Vue Mastery Lession7 and got confused by whatever the content it'd talked about. this video has definitely explained what I was puzzled about. big thank you. great work too. simple, plain and straight to the point.

Ответить
Belo
Belo - 26.07.2021 20:49

Like x2

Ответить
Mohamed Mujahid
Mohamed Mujahid - 28.04.2021 03:19

It would have been better if you changed the name of the class to something other than the name of the variable because I was confused about what is the variable and what is the class, but else this is good

Ответить
Power Point
Power Point - 13.12.2020 15:52

very clear explaination,thx

Ответить
Eufranio Diogo
Eufranio Diogo - 05.09.2020 13:31

Man I don't if you will see this comment but I need to say thanks dude!

Ответить
Tabe Denisdeon
Tabe Denisdeon - 24.08.2020 16:45

I love these channel thank you so much you have are the best

Ответить
Jeff Kamau
Jeff Kamau - 11.06.2020 12:57

your content is fresh

Ответить
Beatrix Ducz
Beatrix Ducz - 05.06.2020 15:49

Don't use toggle. It can be hacked from the dev tools. :)

Ответить
Eric Lim
Eric Lim - 16.05.2020 04:03

Can anyone help me why or when do you need to use the single pair of curly braces

Ответить
Alem Kahrovic
Alem Kahrovic - 12.03.2020 13:28

Can we use compClasses for example show/hide mobile menu?

Ответить
Sebastian Bašić
Sebastian Bašić - 10.01.2020 18:11

Why did you name the class and the boolean the same? It's confusing.

Ответить
perfectlysafepinguin
perfectlysafepinguin - 01.10.2019 23:31

would be easier if the boolean was named <isAvailable> imo

Ответить
Akemedis
Akemedis - 31.07.2019 06:57

Seriously struggling to see how this is easier than JQuery

Ответить
Kyla Magracia
Kyla Magracia - 28.06.2019 05:04

Domo arigatou senpai ~

Ответить
Amber Dev
Amber Dev - 28.05.2019 08:53

Kindly clear my doubt.
this is my compClasses function here major and minor are the names for css class i have passed in css file , valA and valB are data object properties with initial value set to false and are toggled on a click event. Thid is not working..

compClasses:function()
{
return
{
major : this.valA,
minor : this.valB
}


}


the same thing works when i place the curly bracket right next to return. as shown below kindly explain.
compClasses:function()
{
return{
major : this.valA,
minor : this.valB
}


}

Ответить
אדם פרי
אדם פרי - 18.03.2019 14:57

The BEST as always!

Ответить
Iron Fist
Iron Fist - 06.03.2019 19:35

thank you so much. you make it so easy to digest.

Ответить
Make Random Vids
Make Random Vids - 17.02.2019 22:01

Why cant we return the collection of classes by using 'method' instead of 'computed'?

Ответить
attaullah afridi
attaullah afridi - 26.12.2018 10:11

thank you such amazing tutorial.

Ответить
Darya
Darya - 15.11.2018 13:18

Why does available = !available on click toggle the class? Shouldn't it just make available false and then leave it since nothing is saying to change to back to true on click again?

Ответить
Tùng Quốc
Tùng Quốc - 20.09.2018 06:28

wow, thanks you from VietNam = ))

Ответить
daniel gabe
daniel gabe - 02.08.2018 21:56

Thx

Ответить
Samuel Pimenta
Samuel Pimenta - 10.05.2018 03:08

If this is his free content imagine the paid ones...

Ответить
Kalki
Kalki - 21.03.2018 11:23

Thank you sensei!

Ответить
yitzweb
yitzweb - 07.03.2018 19:19

Do you have this code available anywhere?

Ответить
medard tchamdja
medard tchamdja - 02.03.2018 01:14

awesome

Ответить
SDW
SDW - 16.02.2018 01:53

You can only do this with main.js right? When it's a global variable

Ответить
Twerk Studio
Twerk Studio - 19.01.2018 17:45

i intentional clicked on all ads that apear on your videos, because thats the only way i can pay you bro

Ответить
Alex Yap
Alex Yap - 27.11.2017 09:45

any chance you'll get a laravel 5.4 + vue js 2 tutorial up in the future?

Ответить
Sebin Song
Sebin Song - 24.07.2017 07:48

I've come back here again from custom directive tutorial to see if something is possible. what I'm wondering is if it's possible to refer to the class object (i.e. {available: true, nearby: false}) via 'el' parameter of the custom directive. for example,

Vue.directive('theme', {
bind(el, binding, vnode) {
el.class = { a: ... , b: .... }
}
})

is this possible? Or should we use the el parameter only as a read-only purpose?

Ответить
tieuwest
tieuwest - 12.07.2017 19:58

I have watched your videos for two days and it helps a beginner like me a lot to get to know Vue. Thank you so much. I watched some crash course videos before on Vue but you are the best.

Ответить
Raj Chudasama
Raj Chudasama - 10.05.2017 23:02

Can Vue.js be used to develop mobile applications? Would you prefer it over React Native for mobile applications?

Ответить
Paolo
Paolo - 23.04.2017 20:49

Awesome tutorial man. Hope you can do a CRUD using VueJs2!

Ответить
MisterTracks
MisterTracks - 22.04.2017 11:29

Fantastic video! Keep it up!

Ответить