vendredi 19 juin 2015

Why did this if check pass?

I'm checking if $location.$$url is != 'dashboard' however this statement is true, yet it continues.

// the URL is currently at /dashboard
if ($location.$$url !== "/dashboard") 
    console.log('Custome URL found!');
    vs.customURL = true;
    TagFactory.buildUrlObject($location.$$url);

You can see the console.log print out /dashboard below: enter image description here

And here too I'm checking the $location and $$url is "/dashboard" so the if statement should be skipped, yet it continues? enter image description here

Aucun commentaire:

Enregistrer un commentaire