Hi I am new in Anagular js and I try to create a simple prototype 
login,register,dashboard. I have a login page and from login I can go to 
dashboard and register and this is ok, after when i go to register page 
there is a button to pass to dashboard page but this don't work. This is my 
route, I work with ionic that use angularjs, I don't understand because I 
have two console.log in the controller and i see that register controller 
is called and after the call i enter in dashboard but the page don't 
change,:

.config(function($stateProvider, $urlRouterProvider) {
 
  $stateProvider
    .state("login", {
      url: "/login",
      views: {
        "login": {
          templateUrl: "templates/AAA/login.html",
          controller: "Login"
        }
      }
    })
    .state("register", {
      url: "/register",
      views: {
        "register": {
          templateUrl: "templates/AAA/register.html",
          controller: "Register"
        }
      }
    })
    .state("dashboard", {
      url: "/dashboard",
      views: {
        "dashboard": {
          templateUrl: "templates/dashboard.html",
          controller: "Dashboard"
        }
      }
    });
    $urlRouterProvider.otherwise('/login'); 
})

.controller('Register', function($scope, $state) {
   $scope.from_register_to_dashboard_page = function(){
     console.log("sto per effettuare il dashboard");
     $state.go("dashboard"); 
   };
})

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to