Anngular Coomend
Anngular Coomend
Anngular Coomend
ng g c nomfichier
// node js microservice
https://www.youtube.com/watch?
v=gF8IYisXByw&list=PLDmvslp_VR0xZGhJHMjy5dozCDJYZK6W-
//crud tutorial
https://www.youtube.com/watch?v=jKwz1-G4gwc
https://www.youtube.com/watch?v=ACsVNDIuKV8
Pour récupérer des données avec une pagination côté backend node js with mysql
en Angular Materia
////////////
https://milkiya-api.lokabook.ma//bo/residences/solde
//controller
exports.allresidences=(req ,res)=>{
const bearer = req.headers.authorization.split(' ')[1];
let bearer_content = {};
try {
bearer_content = jwt_decode(bearer);
} catch {
return res.status(400).json({
error: 'the token is not valid'
});
}
let {id_residence}={...req.body}
console.log(id_residence)
console.log(result)
let residences = result[result.length-1];
const response = {
residences : residences,
}
console.log(residences)
return res.status(200).json(response).end();}})
//model
const allresidences=`
set @id =? ;
SELECT date_creation FROM tab_residence_categorie WHERE
(@id IS NOT NULL AND id_residence_categorie = @id)
OR (@id IS NULL)
//route
//test
backofficeRouter.post("/residences",residence.allresidences);
//////////////////////////////////////////////////////////////////////////////////
date
set @id_compte =1
,@id_residence= null
,@date_debut=null
,@date_fin= null
,@type_autorisation="Longue" ;