Raagatzo
Raagatzo

Reputation: 27

Route with AngularJS 1.7.2

On the link below, I have an application with some route problem and I can't figure out why this is happen. I'm using Node.js to configure a http-server.

When I try to access localhost:8080/#home, nothing happens.
However, when I configure a "redirect to", the application open in a link like this: "...:8080/#home!#home"

https://github.com/tvbuosi/AngularJS

angular.module('meuModulo',['ngRoute'])
.config(function($routeProvider){
  $routeProvider
  .when('/home', {
    templateUrl: 'templates/home.html',
    controller: 'indexController'
  })
  .when('/contato', {
    templateUrl: 'templates/contato.html'
  })
  .otherwise({
    redirectTo: '/home'
  });
});

Upvotes: 1

Views: 1007

Answers (0)

Related Questions