Skip to content

Category: Questions

Extract text between last slash and last dot using regex

I have string like this in javascript at LoggerService.log (/Users/apps/api/webpack:/pcs-goc-api/pcs-libs/logger/src/logger.service.ts:107:29) I want to extract logger.service from it. the formula is between last / to last . I can extract from last / using /([^/]+$)/g but don’t know how to limit the fin…

Slick Carousel – RTL function

I am facing an issue in Slick Carousel to work in both LTR and RTL. It works by default in LTR, but when I change the page to RTL I get a blank container. There is an option “rtl: true” but that would make it always working in rtl. I have tried to add a conditional function in JS file

Stop navigation if another link is clicked Angular

I have a form in angular and when it is submitted, there is a redirection to homepage after X seconds. Here is the service containing the redirection method: Here is the submit method: I’d like to know how can I stop redirectToHome() if suppose an user click somewhere else in the menu before x seconds h…

Send data to server using Axios VueJs

It is necessary to send data to the server in the required format, I don’t understand how to organize it correctly, the same JSON structure. You must send when attaching a file (@change), the file itself and a comment. Here is what I was able to do https://codepen.io/JessikaJes/pen/rNvgYwP Answer Change the c…