0
私はログインとサインアップフォームを持っています。 1つのメインコントローラにログインとサインアップのjsコードを定義しました。ユーザーが新規の場合、私はログインの下にリンクを定義しました.URLのクリックにより、別のHTMLページにリダイレクトされます。 UR1はルーティングされていますが、私のjsコードは応答していません。間違いを訂正しようとしましたが、達成できませんでした。ngRouting Angularjsでの問題
どのような間違いがあったのか教えてください。どのような助けやアドバイスを大いに感謝します。
AngularJSコード:
var app = angular.module('logapp',['toastr','ngRoute']);
app.config(['$routeProvider',function($routeProvider){
$routeProvider
.when('/login',{
templateUrl : "login.html",
controller : "credientials"
})
.when('/signup',{
templateUrl : "signup.html",
controller : "signctrl"
})
.when('/practice',{
templateUrl : "practice.html",
controller : "practicectrl"
});
$routeProvider.otherwise({ redirectTo: '/login'});
}]);
コントローラーコード:
1. app.controller('credientials',['$scope','$route','$rootScope','$window','$location','$http','toastr','Authentication',function($scope,$route,$rootScope,$window,$location,$http,toastr,Authentication)
2. app.controller('signctrl',function($scope){});
app.controller('head',function($scope){
$scope.hometitle = "Create your account here. It's take only a minute."
});
1. Login controller
2. Signup controller
を使用して、どのようにあなたがルート関連のリンクURLを入力しないされているバージョンは何? –
バージョンは1.6.4です。 '
{{footer}} Here
\tHTML5モードを使用していない場合は、hashprefixで呼び出します。 –