我收到此错误Error: Argument 'readingController' is not a function, got undefined.
,页面上没有任何内容。我做错了什么?
var app = angular.module('Tutorials', ['functions', 'ui.utils', 'tutorials']).controller('main', function($scope, $element, Position, Romanize) {
$scope.sectionNumber = Position.sectionNumber;
$scope.tutorialNumber = Position.tutorialNumber;
$scope.questionNumber = Position.questionNumber;
$scope.sections = sections;
$scope.currentMaterials = []
$scope.currentMaterial = "";
var readingController = function($scope, Romanize) {
$scope.currentMaterials = $scope.sections[$scope.sectionNumber].tutorials[$scope.tutorialNumber].material;
$scope.currentMaterial = $scope.currentMaterials[$scope.questionNumber];
$scope.getRomanization = function(Romanize) {
Romanize.get($scope.currentMaterial).then(function(d) {
$scope.romanized = d;
});
$scope.$apply();
};
$scope.getRomanization(Romanize);
$scope.$apply();
$scope.checkRomanization = function(userRomanization) {
if ($scope.romanized === userRomanization) {
$scope.questionNumber++;
$scope.getRomanization(Romanize);
};
}
};
$scope.loadFromMenu(0, 0, true);
}).config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
$routeProvider.when('/grammar/Reading/Basic Vowels', {
templateUrl: '/grammar/Templates/Reading.html',
controller: 'readingController'
}).when('/test/secondTab', {
templateUrl: '/js/test/angular/views/secondTab.html',
controller: 'SecondTabCtrl'
}).otherwise({
redirectTo: '/'
});
$locationProvider.html5Mode(true);
}]);