2016-09-28 8 views
1

ngGridの使用中に以下のコードを使用しました。Angularjs ng-Grid注入エラー

var MyApp = angular.module("MyApp", ['ngGrid','ngRoute', 'ProductService']); 

しかし、それは私に次のエラーを与えました。

angular.js:68 Uncaught Error: [$injector:modulerr] Failed to instantiate module MyApp due to: Error: [$injector:modulerr] Failed to instantiate module ngGrid due to: Error: [$injector:nomod] Module 'ngGrid' 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.

スタックオーバーフローの提案に従って、私は以下のようにコードを変更しました。

var MyApp = angular.module("MyApp", ['ui.grid','ngRoute', 'ProductService']); 

でも、私は別のエラーが発生しました。

angular.js:68 Uncaught Error: [$injector:modulerr] Failed to instantiate module MyApp due to: Error: [$injector:modulerr] Failed to instantiate module ui.grid due to: Error: [$injector:nomod] Module 'ui.grid' 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.

<html xmlns="http://www.w3.org/1999/xhtml" data-ng-app="MyApp"> <head><title></title> 
<link href="Content/bootstrap.css" rel="stylesheet" /> 
<link rel="stylesheet" type="text/css" href="ng-grid.css" /> 
<script src="Scripts/jquery-1.9.1.js"></script> 
<script src="Scripts/bootstrap.js"></script> 
<script src="Scripts/angular.js"></script> 
<script src="Scripts/angular-route.js"></script> 
<script type="text/javascript" src="ng-grid-1.3.2.js"></script> 
<script src="app.js"></script> 
<script src="service.js"></script> 
<script src="controller.js"></script> 

すべてのボディはngGridを注入し、angularjsアプリケーションでそれを使用する方法についての手掛かりを持っていますか?

ありがとうございました。プロジェクトに

+0

は、あなたが ''

関連する問題