AngularJs代码导航到按钮单击事件上的另一个页面。我已经捕获了按钮点击事件,但无法导航到其他页面。 以下是我的代码: HTML文件:AngularJs代码导航到buttonclick中的另一个页面
<!DOCTYPE html>
<html>
<head>
<script src="js/angular.min.js"></script>
<script src="js/app/home.js"></script>
</head>
<body ng-app="myapp">
<div ng-controller="TestCtrl">
<button ng-click="clicked()">Click me!</button>
</body>
</html>
和JavaScript文件是:
var VLogin = angular.module('myapp',[]);
VLogin.controller('TestCtrl', ['$scope',function($scope) {
$scope.clicked = function(){
$location.path('/test.html');
}
}]);
谁能帮我解决我的问题:http://stackoverflow.com/questions/38546218/angularjs-form-is-不提交数据 – Ankit 2016-07-25 02:38:52