Nested string interpolation in JavaScript

754 Views Asked by At

While trying to generate a URL dynamically I ended up nesting interpolation like below:

`api/topics/${topicId}/assessments${assessmentId ? `/${assessmentId}` : ''}`;

This worked correctly, but my worry is if this brings with it any security vulnerabilities in an Angular built application.

0

There are 0 best solutions below