In angular to redirect to another page it was used
<a [routerLink]="['/editar-producto',producto.id]" class="btn btn-warning">Editar</a>
But in ionic what is the form? How should it be placed in app.component.ts to receive these parameters?
this.pages = [
{ title: 'Home', component: HomePage },
{ title: 'List', component: ListPage },
{ title: 'Productos', component: ProductsPage },
{ title: 'Agregar producto', component: CreateProductPage }
];
but to receive parameters?
In angular4 the configuration was
import { ModuleWithProviders } from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
//Componentes
import {HomeComponent} from './components/home.component';
import {ErrorComponent} from './components/error.component';
import {ProductosComponent} from './components/productos.component';
import { ProductoAddComponent } from './components/producto-add.component'
import {ProductoDetailComponent} from './components/producto-detalle.component';
import {ProductoEditComponent} from './components/producto-edit.component';
const appRoutes: Routes = [
{path: '', component: HomeComponent},
{path: 'home', component: HomeComponent},
{path: 'productos', component: ProductosComponent},
{path: 'crear-producto', component: ProductoAddComponent},
{path: 'producto/:id', component: ProductoDetailComponent},
{path: 'editar-producto/:id', component: ProductoEditComponent},
{path: '**', component: ErrorComponent}
];
export const appRoutingProviders: any[] = [];
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
But in ionic I do not have any of this
{path: 'editar-producto/:id', component: ProductoEditComponent},