tôi gặp phải các lỗi sau đây với một nguyên nhân gốc rễ của Mô-đun 'ngRoute' không có sẵn đangKhông thể nhanh chóng lỗi mô-đun trong js góc
Uncaught Error: [$injector:modulerr] Failed to instantiate module Amail due to:
Error: [$injector:modulerr] Failed to instantiate module ngRoute due to:
Error: [$injector:nomod] Module 'ngRoute' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument."
Javascript:
var amailServices = angular.module('Amail',['ngRoute']);
function emailRouteConfig($routeProvider) {
$routeProvider.
when('/', {
controller: ListController,
templateUrl : 'list.html'}).
when('/view/:id',{
controller : DetailsController,
templateUrl:'detail.html'}).
otherwise({
redirectTo:'/'
});
}
amailServices.config(emailRouteConfig);
Làm thế nào để sửa chữa này
_ "Bạn viết sai chính tả tên mô-đun hoặc quên tải nó" _ - Bạn có? – elclanrs
@elclanrs Tôi quên tải nó. Cảm ơn –