i den Fehler nicht finden konnte ich selbst gesucht, aber kein Ergebnis mir bitte meinen Code index.htmlwarum bekomme ich diesen Fehler: ng: areq Bad Argument
<!DOCTYPE html>
<html >
<head>
<title>Page Title</title>
</head>
<body ng-app="app">
<div ng-view></div>
<script src="controller.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js"> </script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-route.min.js"> </script>
</body>
</html>
login.html
<div ng-controller="loginCtrl">
<form action="/" id="myLogin">
Username:<input type="text" name="username" id="username" ng-model="username">
Pasword:<input type="password" name="password" id="password" ng-model="password">
<button ng-click="submit()">Login</button>
</form>
</div>
controller.js
var application=angular.module('app',['ngRoute']);
application.config(function($routeProvider){
$routeProvider
.when('/',{
templateUrl:'login.html'
})
.when('/Dashboard',{
templateUrl:'dashboard.html'
})
.otherwise({
template:'404 not found'
});
});
application.controller('loginCtrl',function($scope,$location){
$scope.submit=function(){
var uname=$scope.username;
var password=$scope.password;
if($scope.username =='admin' && $scope.password=='admin'){
$location.path('/Dashboard');
}
};
});
i couldn't find where is the error and when i try it i get this error https://docs.angularjs.org/error/ng/areq?p0=loginCtrl&p1=not%20a
gleiches Problem :(nicht – asus1902
gelöst Plunk arbeitet Fügen Sie Ihre 'dashboard.html' Datei auch weiter in diese Angelegenheit zu untersuchen.. – Abhi