Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Canceling from the form and returning to the top level
Message
 
 
À
23/09/2016 06:51:53
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01641209
Message ID:
01641249
Vues:
26
>>Hi everybody,
>>
>>In the preferences forms we have the following code in the Cancel button:
>>
>>
>>$scope.cancel = function () {
>>            $log.debug("Cancel")
>>            $scope.form.$setPristine();
>>            $scope.showForm = false;
>>            
>>            window.location.href = userService.baseUrl;
>>        };
>>
>>
>>It works, but I can see the re-loading of the page which I don't like. Is there another way to go to the root of the application but not doing a page re-load? If the last line is commented, the forms is no longer shown, but the path remains the same, which is wrong.
>>
>>Thanks in advance.
>
>Probably best to use the $location service - $location.path()
>
>Read this : https://docs.angularjs.org/guide/$location

Looks like it should be the ticket, thanks a lot.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform