Mayank Agarwal has Published 373 Articles

How to capitalize a String using VueJs filters?

Mayank Agarwal

Mayank Agarwal

Updated on 13-Apr-2023 16:37:38

3K+ Views

Vue can be defined as a progressive framework for building the user interfaces. It has multiple directives that can be used as per the user needs. The basic core library is mainly focused on building the view layer only and it is also easy to pick up other libraries or ... Read More

How to call a VueJS component method from outside the component ?

Mayank Agarwal

Mayank Agarwal

Updated on 13-Apr-2023 16:36:08

7K+ Views

Generally, we cannot call a Vue component method from outside the component. But we have a way to call the component from outside. We can use the Vue’s ref Directive. This metthod allows a component to be referenced from the parent for direct access. To apply the ref Directive, we ... Read More

How to call a function with Mouse hover in VueJS?

Mayank Agarwal

Mayank Agarwal

Updated on 13-Apr-2023 16:35:05

2K+ Views

While hovering over a div or an element sometimes we require to display some information. This information or data is displayed while hovering over it with the mouse. Therefore, to display this data, we basically use the JS function @mouseover to display data. In the above specific case, we will ... Read More

How to bind the background image in Vue.js?

Mayank Agarwal

Mayank Agarwal

Updated on 13-Apr-2023 16:33:52

7K+ Views

The value for v-bind:style is just a plain JavaScript object that works upon some rules for binding the content. The value of the background image should be a string. So we can apply or data-bind the background image in Vue.js using the style tag and then defining the backgroundImage URL ... Read More

How to bind attributes in VueJS?

Mayank Agarwal

Mayank Agarwal

Updated on 13-Apr-2023 16:32:38

2K+ Views

The v-bind directive in VueJS can be used for binding one or more attributes, or a component prop to an element. If the attribute is bonded towards our data that is defined in the Vue instance, then we can observe these data changes dynamically since the attributes are binded. To ... Read More

How to apply Switch in Vue using Filters?

Mayank Agarwal

Mayank Agarwal

Updated on 13-Apr-2023 16:31:06

844 Views

Vue can be defined as a progressive framework for building the user interfaces. It has multiple directives that can be used as per the user needs. The basic core library is mainly focused on building the view layer only and is also easy to pick up other libraries or integrate ... Read More

How to add or apply global variables in Vue.js?

Mayank Agarwal

Mayank Agarwal

Updated on 13-Apr-2023 16:29:26

5K+ Views

In a Vue.js application there may be data or utilities that are used in many components, but you don’t want to change its scope and keep its value same for all the components. These types of variables are called the global variables. In such cases, the user can use the ... Read More

How to add multiple data types for props in Vue.js?

Mayank Agarwal

Mayank Agarwal

Updated on 12-Apr-2023 17:02:16

769 Views

The javascript attribute names are case insensitive, so browsers are made in a way to interpret any uppercase characters to lowercase. This means, while using the DOM elements, camel Cased props names need to use their kebab-based (hyphen-delimited) equivalents. So let’s say that you are not sure of the type ... Read More

How to add elements to an Array using filters in Vue ?

Mayank Agarwal

Mayank Agarwal

Updated on 12-Apr-2023 17:00:22

620 Views

Vue can be defined as a progressive framework for building user interfaces. It has multiple directives that can be used as per the user needs. The basic core library is mainly focused on building the view layer only and is also easy to pick up other libraries or integrate with ... Read More

How to access child method from the parent in Vue.js?

Mayank Agarwal

Mayank Agarwal

Updated on 12-Apr-2023 16:59:51

5K+ Views

Let’s say you have two nested components i.e. a component inside another component. How will you be able to access the child methods from the parent? To access the child method from the parent method you could use ref. Or you can also access the descendants of a parent via ... Read More

Advertisements