1

I need to redirect to a page that i get from my DB, but, i need to do this in my controller.

Is there any way to redirect to another page using some angular function?

Because $locate and window.location just put the link after my website base url. Here an example of what it is doing now:

http://ip/cliente_ecommerce_v2/em_desenvolvimento/front/bernardo/%EF%BB%BF%EF%BB%BFhttps://sandbox.pagseguro.uol.com.br/v2/checkout/payment.html?code=nope

The code:

Conecta('get','getFinalizaCompra', Cookies.get("hash_cliente")).then(function(valor) {
            console.log(valor);
           window.location.href = valor;
        });
Maurício Krüger
  • 397
  • 10
  • 26
Bernardo Kowacic
  • 230
  • 2
  • 14

1 Answers1

3

I just put $data = substr($data, 9); in the response of my curl . This makes the garbage that came along with the link is ignored and the link began to function normally. This code causes the 9 first letters of the string are ignored by php.

Bernardo Kowacic
  • 230
  • 2
  • 14