Found 8895 Articles for Front End Technology

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

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 the method this.$root (a parent component) which can access the child components using the this.$children array. In the same way, the child can access its parent via the this.$parent. The vue.js basically warns against these for the below two reasons − It tightly couples the parent to the ... Read More

How can I pass parameters in computed properties in VueJS?

Mayank Agarwal
Updated on 12-Apr-2023 16:29:24

2K+ Views

The difference between a computed property and a method is that computed properties are cached, these properties only change when their dependency change. A method will be evaluated every time it is being called. The only useful situation is when the user wants the getter and needs to have the same parameterized. The same situation occurs in vuex also. Example Copy and paste the below code snipped in your Vue project and run the Vue project. You shall see the below output on the browser window. FileName - app.js Directory Structure -- $project/public -- app.js ... Read More

Checking if an image is loaded or not on the browser using VueJS?

Mayank Agarwal
Updated on 12-Apr-2023 16:27:11

2K+ Views

Whenever we insert an image in the front end of any system, it is very important to show the user proper data and images to enhance the user experience. In any project, an image is basically loaded from the remote path URL or from the application. An image may not be loaded properly in the below scenarios − Configuring the wrong image URL Poor Internet/Network connection It is very important to check if an image is loaded or not, because if an image does not load due to poor network connection we can try loading the image ... Read More

Adding or removing elements from a list dynamically using VueJS?

Mayank Agarwal
Updated on 12-Apr-2023 16:23:42

2K+ 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 with them. We can dynamically add or remove elements from a list in VueJS using the v-model directive. All the possibilities are binded to a single channel while using this directive. When the user selects an option out of several options, the same will be added to the list. On ... Read More

How to set length to set the gap between the columns in CSS?

Shabaz Alam
Updated on 12-Apr-2023 16:08:54

228 Views

CSS is a powerful tool in web development, which allows developers to create multi-column layouts for text content on a web page. Columns are an efficient way to break up long blocks of text into more manageable chunks. One important aspect of CSS columns is the gap between them. Different Methods to Set Column Gap in CSS Below are some of the many ways to set the gap between columns in CSS. 1. Using the column-gap Property The column-gap property is the most common way to set the gap between columns. This property sets the space between the columns in ... Read More

How to set indent the second line of paragraph using CSS?

Shabaz Alam
Updated on 12-Apr-2023 16:06:05

2K+ Views

HTML is used to create the structure of a web page. Additionally, CSS is used to style the visual appearance of those pages. In CSS, Indenting is one of the important aspects of the formatting text on the web pages. It allows developers to create the visual effects at the beginning of a paragraph. Indenting can be used to make the text easier to read and to create a sense of structure within a document. Indenting in CSS CSS is a powerful tool that allows developers to control the visual presentation of HTML elements on the web page. We can ... Read More

How to set height of an iframe element using HTML?

Shabaz Alam
Updated on 12-Apr-2023 16:04:46

1K+ Views

The iFrame element is a powerful tool in HTML. It allows web developers to embed external content into a web page. It is a container that displays other HTML documents within a page. The default height of an iFrame element does not always fit with the webpage's layout. That's why we need to ensure that it's sized correctly so that it fits seamlessly into the page layout. Here, we will discuss how to set the height of an iFrame element using HTML. Understanding the IFrame Element iFrame stands for inline frame. It allows developers to embed content, such ... Read More

How to set fixed width for td in a table ?

Shabaz Alam
Updated on 13-Apr-2023 16:56:54

8K+ Views

HTML tables are a crucial element of web development. They are used to organize and display data in a structured format. The HTML tables allow web developers to arrange data into rows and columns of cells. HTML tables are created using the tag which consists of several components such as , , and . Each of these components has its own unique properties. Understanding the Element in HTML Tables The tag element defines a data cell in an HTML table. It is used to display data in the table, such as text, images, or links. Each ... Read More

How to set div width to fit content using CSS?

Shabaz Alam
Updated on 26-Jun-2024 17:46:43

40K+ Views

To set div width to fit content using CSS is an important task due to various reasons like making a responsive design and optimal use of space. In this article, we have used a p element to write content inside div element. We are having div as parent element and content written in p is our child element. Our task is to set div width to fit content written in p element. Approaches to Set div width to Fit Content using CSS There are multiple ways to set div width to fit content using CSS, here is a list ... Read More

How to set different type of cursors using CSS?

Shabaz Alam
Updated on 12-Apr-2023 15:43:40

112 Views

CSS (Cascading Style Sheets) is a powerful tool for designing the visual appearance of a website, including the cursor style. Cursors are an important aspect of web design. It helps to provide visual feedback to the users and enables them to interact effectively. What is a Cursor? Cursor is a position indicator that indicates the user's current location on the screen. It is also known as a "caret." It plays an important role in user interface design. In CSS, we can set the cursor as needed to provide visual feedback to the user, which indicates the action that can be ... Read More

Advertisements