Skip to main content

Try this code

 var vm = new Vue({ created() { let urlParams = new URLSearchParams(window.location.search); console.log(urlParams.has('yourParam')); // true console.log(urlParams.get('yourParam')); // "MyParam" }, 
var vm = new Vue({ created() { let urlParams = new URLSearchParams(window.location.search); console.log(urlParams.has('yourParam')); // true console.log(urlParams.get('yourParam')); // "MyParam" }, }); 

Try this code

 var vm = new Vue({ created() { let urlParams = new URLSearchParams(window.location.search); console.log(urlParams.has('yourParam')); // true console.log(urlParams.get('yourParam')); // "MyParam" }, 

Try this code

var vm = new Vue({ created() { let urlParams = new URLSearchParams(window.location.search); console.log(urlParams.has('yourParam')); // true console.log(urlParams.get('yourParam')); // "MyParam" }, }); 
Source Link
Correcter
  • 3.7k
  • 2
  • 18
  • 14

Try this code

 var vm = new Vue({ created() { let urlParams = new URLSearchParams(window.location.search); console.log(urlParams.has('yourParam')); // true console.log(urlParams.get('yourParam')); // "MyParam" },