How to put a variable in the middle of the non-angular route

0
Hello, I am developing a front-end that will connect with several API's alike, but with different banks (The Client has the API installed, but this front is for employee access, and for the sake of reducing maintenance by upgrading in all clients will host the front in a single place and make the control of where to access), however to know which API access would like to get it to take the route, but as the idea is to host in a single URL would like to put the company name responsible for the API that I will access. For example

  

www.mycompany.com/ {VariableCompanyName} / {Normal angle directions}

there with the VariableCommonName would do a URL control to find the right API.

    
asked by anonymous 14.06.2018 / 15:30

1 answer

0

You could define a global variable eg who knows in app.js

var enderecos = {
    cliente1: 'www.minhaempresa.com/nomeCLiente1/',
    cliente2: 'www.minhaempresa.com/nomeCLiente2/',
}

ai at the time of calling could do

enderecos.cliente1 + 'rota-normal'
    
14.06.2018 / 16:07