[solved] [v2] Dynamic name for components in routes to avoid "undefined" in app.view.current.name

I’ve got this route

{
  path: '/pages/:entidad/listado',          // ej: href="/pages/frutas/listado"
  componentUrl: './pages/listados.html',
  options: {
    context: {
              entidad: '{{entidad}}',         // Envia por param: "frutas"
              },
  },
}, 

How can I set the “name” for the page, so when I do app.view.current.name is not undefined?
I would like it to be " name: ‘:entidad_listado’

page name must be set in page’s data-name attribute

Hi Vladimir!
Yes, I’ve got it on the page:

and the console.log of app.view.current:

It is a view name, not the page name. Page name available in page events on page data object

1 Like