Hay más clases de Ionic que de Sails, no sé si debería estar este curso en la carrera de backend
Introducción
Qué aprenderás sobre API con Sails.js
Presentando el proyecto
Comenzando con Sails
Introducción a Sails.js
Estructura de archivos
Preparación del ambiente de desarrollo
Setup de Espacio de Trabajo
Generando rutas REST con blueprint
Instalación de MongoDB
Conexión a Mongo
Instalar MySQL y usarlo con Sails (a través de WaterLine)
CRUD
Entendiendo operaciones CRUD
Crear modelo de rodada
Crear app de Ionic
Obtener todas las Rodadas: preparando la aplicación para mostrar datos
Obtener todas las Rodadas: mostrando los datos
Crear Rodada: recibiendo parámetros desde la URL
Crear Rodada: enviando información desde el formulario
Actualizar Rodada
Eliminar Rodadas
Autenticación y Usuarios
Obtener Rodada
Crear Modelo y Controller de Usuarios
Implementar validación de modelo
Nueva versión de la librería Joi
Crear Usuario
Cifrado de contraseña
Implementación de Login
Sistemas Externos
Uso de JSON Web Token
Policies: verificar si usuario está loggeado
Agregar usuario a Ride
Preparando la App para implementar el Login y Sign up
Implementando Login
Implementando Sign up
Agregar puntos de Rodada
Obtener API Keys para Clima y Distancias
Integración Google Geocoding: definiendo la lógica
Integración Google Geocoding: probando la funcionalidad
Integración Weather API
Desplegar clima, distancia y tiempo en cada punto de Rodada
Cierre
Cierre
You don't have access to this class
Keep learning! Join and start boosting your career
If you are looking to improve the user experience by allowing them to manage data effectively, the use of interactive buttons is essential. Any modern application should facilitate direct interaction to update and create data without relying on tools like Postman. Here we will cover how to implement buttons in an application using IONIC and Typescript.
To manage our data wheels, we will create two crucial buttons:
First, let's add the necessary tags in the code corresponding to the Toolbar
. For this, we follow the steps:
<ion-buttons slot="start"> <ion-button (click)="getRaids()"> <ion-icon slot="start" name="refresh"></ion-icon> </ion-button></ion-buttons></ion-buttons>.
Here, getRaids()
is a method that we will define to get the wheels information. Next, we prepare the following button, which will redirect to a new page to create wheels.
<ion-buttons slot="end"> <ion-button routerLink="/create-raide"> <ion-icon slot="end" name="add"></ion-icon> </ion-button></ion-buttons></ion-buttons>
GetRaids
method?This method is fundamental. Its main task is to call the API to get the updated wheel information.
function getRaids() { // we call the API to get the wheels this.raidService.getRaids().subscribe((raids) => { this.raids = raids; });} }
Flexibility in routes is key to reusing components, allowing the user to create or edit wheels via a URI parameter.
const routes: Routes = [ { { path: 'create-raide/:id', component: RaideFormPage }, { path: 'create-raide', component: RaideFormPage }];
The ActiveRoute
is crucial to extract parameters from the URL, allowing differentiated behaviors depending on the user action (create vs edit):
{import { ActivatedRoute } from '@angular/router';
@Component({ // ...})export class RaideFormPage implements OnInit { constructor(private route: ActivatedRoute) {}
ngOnInit() { this.route.params.subscribe(params => { const id = params['id']; if (id) { this.loadRaide(id); // Method for loading data from the specific wheel } } );} }}
Now that our buttons are ready and the routes are working correctly, the next step is to implement the form that will allow us to enter the details of the wheels. This will be done in a new class that will focus on building a form using Angular forms to collect and validate the data before it is submitted.
Contributions 4
Questions 0
Hay más clases de Ionic que de Sails, no sé si debería estar este curso en la carrera de backend
Con todo respeto profe, totalmente innecesario ese curso de Ionic. Incluso con about:blank y usando fetch, se podia demostrar el llamado a las peticiones.
✌
Want to see more contributions, questions and answers from the community?