gilsdav / ng-afelio

Extended Angular CLI
5 stars 6 forks source link

Allow regexp in mock url and get match infos #30

Closed gilsdav closed 4 years ago

gilsdav commented 5 years ago

Usage example:

{ url:  /\/paymentPlans\/(\w*)\/bob/m, methods: 'GET', name: 'getPaymentPlanDetail', response: paymentPlanDetail }
const paymentPlanCreation = (request, matches) => {
    return new HttpResponse({
        status: 200,
        body: matches[1] as number
    });
};
gilsdav commented 4 years ago

Available since version 0.1.0