所以負載的基本頁,我期待的頁面重定向到:http://myurl.com/index.php#/search角,否則不能正常工作
目前沒有任何反應...任何想法?
<!doctype html>
<html ng-app="appDep">
<head>
<meta charset="utf-8">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular-route.js"></script>
<script>
var app = angular.module('appDep', ['ngRoute']);
app.config([ '$routeProvider', function($routeProvider) {
$routeProvider.when('/search/:sig?', {
templateUrl: 'blablabla',
controller : 'notYetCreated'
}).otherwise({
redirectTo : '/search'
});
} ]);
app.controller('notYetCreated', function($scope,$log,$http,$q,$routeParams, $location) {
console.log('test')
});
</script>
</head>
<body>
HI
<script type="text/ng-template" id="blablabla">
TEST
</script>
</body>
</html>
嘗試建立與blablabla.html – 2014-09-23 17:08:35
模板看看開發商的窗戶,看看是否有任何錯誤 – 2014-09-23 17:09:38
在控制檯中沒有錯誤。 – KingKongFrog 2014-09-23 17:11:56