Blog

Global Variables in Vue 3

User define global variables in vue 3 like api url Assistant In Vue 3, you can define global variables like an API URL using several approaches. Here are the most common methods: — ### **1. Using `app.config.globalProperties` (Recommended for Vue Apps)** import { createApp } from 'vue'; import App from './App.vue'; const app = createApp(App); […]

Change DDEV Port Issue

User Starting syt… Container ddev-ssh-agent Recreate Container ddev-ssh-agent Recreated Container ddev-ssh-agent Started ssh-agent container is running: If you want to add authentication to the ssh-agent container, run 'ddev auth ssh' to enable your keys. Building project images…… Project images built in 4s. Container ddev-syt-adminer Stopped Container ddev-syt-db Recreate Container ddev-syt-db Recreated Container ddev-syt-adminer Created Container […]

Vuetify Stepper Content Fix

User <script> import { ref,shallowRef } from "vue"; import { useForm, useField } from 'vee-validate' import IconLoading from '../components/icons/IconLoading.vue'; import SingleColumn from '../layouts/SingleColumn.vue'; const otp = shallowRef('') const { handleSubmit, handleReset, values } = useForm({ validationSchema: { name (value) { if (value?.length >= 2) return true return 'Name needs to be at least 2 characters.' […]

Email Validation Regex Fix

User <script> import { ref } from "vue"; import { useForm, useField } from 'vee-validate' import IconLoading from '../components/icons/IconLoading.vue'; import SingleColumn from '../layouts/SingleColumn.vue'; const { handleSubmit, handleReset } = useForm({ validationSchema: { name (value) { if (value?.length >= 2) return true return 'Name needs to be at least 2 characters.' }, email (value) { if […]

User Registration Form Update

User <script> import { ref } from "vue"; import { useForm, useField } from 'vee-validate' import IconLoading from '../components/icons/IconLoading.vue'; import SingleColumn from '../layouts/SingleColumn.vue'; const { handleSubmit, handleReset } = useForm({ validationSchema: { name (value) { if (value?.length >= 2) return true return 'Name needs to be at least 2 characters.' }, email (value) { if […]

Vue Stepper Component Review

User Assistant Your “ component is structured correctly, and it sets the active step to **step 2 (Verify User [plugin:vite:import-analysis] Failed to resolve import "vee-validate" from "src/views/RegisterView.vue". Does the file exist? Assistant The error `[plugin:vite:import-analysis] Failed to resolve import "vee-validate" from "src/views/RegisterView.vue"` usually occurs when Vite cannot find the `vee-validate` package. Here are some steps […]

Vuetify Stepper Form Implementation

User add register form in step 1 in step2 otp verification Assistant Here's an improved Vue 3 “ component using Vuetify that includes: – A **registration form** in Step 1 – **OTP verification** in Step 2 – A simple **login button** in Step 3 — ### Features: – Uses `v-form` for validation – Implements a […]

YouTube API Video Parameters

User https://www.googleapis.com/youtube/v3/videos parameters Assistant The [YouTube Data API v3](https://developers.google.com/youtube/v3/docs/videos/list) allows you to retrieve video details using the `videos` endpoint: ### **Endpoint:** GET https://www.googleapis.com/youtube/v3/videos ### **Required Parameters:** | Parameter | Type | Description | |———–|——|————-| | `part` | string | Specifies the resource properties to include in the response (e.g., `snippet,contentDetails,statistics`). | | `id` | string […]

Install Node.js and Yarn

User neeraj_iwari@BOOK-VKAD2MI9OH:/mnt/c/WINDOWS/system32$ curl -o- -L https://yarnpkg.com/install.sh | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 53 100 53 0 0 191 0 –:–:– –:–:– –:–:– 192 100 7152 100 7152 0 0 12009 0 –:–:– –:–:– –:–:– 33420 Installing Yarn! /home/neeraj_iwari/.yarn/bin/yarn Yarn requires […]

Featured Image URL Retrieval

User get featured image url from https://postmymeds.co.uk/wp-json/wp/v2/posts Assistant To retrieve the featured image URL for posts from the WordPress REST API at https://postmymeds.co.uk/wp-json/wp/v2/posts, you can use the `_embed` query parameter to include embedded media in the response. Here's how you can do it: 1. **Make a GET request with `_embed`:** Append `?_embed` to your API […]