Get value params

hi everyone, I would like to take the id parameter so I can use it for a query. How can I do?
I pass it like this: <a href="/menu-single/1/"><h4>Fresh Grilled Salmon</h4></a>

and my routes.js: path: '/menu-single/:id/', url: './menu-single.php',

1 Like

in router component: this.$

1 Like

when i enter in my menu-single page how i can set the id value to a php variable?

please, unfortunately I don’t know how the router component

this is how i solved it:
the link is:
the route is:
path: ‘/blog/:date’,
templateUrl: ‘./pages/blog.php?date={{this.$}}’,

and print_r($_GET) in blog.php prints out:
Array ( [date] => 11-2-2018 )


//save array
SaveData: function(key, value)
var storage = localStorage;
storage.setItem(key, value);

GetUserParam: function(param) 
  var app = this.$app;
  //console.log("userObj: "+app.methods.LoadData("userObj"));
    return 0;

//convert array to jason
var array = JSON.parse(app.methods.LoadData(“userObj”));
return array[param];

id = 1