Seeking a method that can alter a variable like so:
private _buildUrlCategories(url: string) {
url += ";categories=" + this.findForm.value.categories;
}
private _buildUrl() {
let url = "/#/find";
this._buildUrlCategories(url); //modifies the url
}
If direct modification isn't possible, I could simply return the updated url and use
url += this._buildUrlCategories(url)
.
Is achieving this feasible? Does this approach have a specific name or technique associated with it?