Angular JS route causing infinite loop

后端 未结 9 1445
清歌不尽
清歌不尽 2020-12-31 11:00

I\'m trying to figure out why the page doesn\'t navigate to its template when clicked. The URL updates, and I have no JS errors.. I believe it loads the file, but t

9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-31 11:23

    The only thing I see are missing brackets and a missing comma. You may try with this:

    $routeProvider
      .when("/login", {
        templateUrl: "sessions/new.html",
        controller: SessionsController
      })
      .otherwise({
        redirectTo: "/"
      });
    

提交回复
热议问题