$scope.cancel = function () { $scope.form.$setPristine(); $scope.showForm = false; window.location.href = "/"; };It works but with a considerable delay. E.g. the form disappears, but the URL changes only after about 20+ seconds to the localhost. Is there a better way to apply similar functionality? E.g. I simply want to re-set the current view to point to nothing as we "closed" that form by pressing 'Cancel'.
(function () { 'use strict'; var app = angular.module('sysMgrApp'); app.config(['$stateProvider', function ($stateProvider) { $stateProvider.state('home', { url: '/', controller: 'prefsAcsCrudController', template: '' }).state('accountUDFs', { url: '/AccountUDFs', templateUrl: 'customerAccounts/PrefsAcs/AccountsUDFs' }).state('invoiceUDFs', { url: '/InvoiceUDFs', templateUrl: 'customerAccounts/PrefsAcs/InvoiceUDFs' }).state('confirmationText', { url: '/ConfirmationText', templateUrl: 'customerAccounts/PrefsAcs/ConfirmationText' }); }]);The problem I am trying to solve I described in another thread and this StackOverflow thread: