Category: Vue.js

Data selection is one of the basic requirement when creating a dynamic website.

Mainly data is fetched from the database on page refresh but for without page refresh require to send AJAX request.

I am using Axios package to send AJAX request.

In this tutorial, I show how you can fetch records from MySQL database using Vue.js and PHP with Axios package.

Fetch records from MySQL Database with Vue.js and PHP

AJAX DataBase PHP Vue.js

Checkboxes are used on the page to allow the user to select multiple items from the list.

If the user wants to select all items then it needs to check all checkboxes one by one.

To make the selection process easier by adding a single checkbox and use it for check uncheck all checkboxes.

In this demonstration, I am using the model to check uncheck all checkboxes in Vue.js and read the checked values.

Check uncheck all checkboxes with Vue.js

Vue.js

Sometimes it is required to control the flow of the CSS classes and style properties of the element based on the expression at runtime.

In Vue.js there is a v-bind directive to update the HTML attribute.

In this tutorial, I am using this on class v-bind:class and style v-bind:style.

The v-bind:class adds and removes classes from the element without affecting the value of the class attribute.

In the demonstration, I am using the v-bind directive to dynamically toggle CSS class and style property from the element on a click.

How to Toggle CSS classes and styles with Vue.js

How To Vue.js