我在控制器中注入ngHandsOnTable时遇到错误,
http://errors.angularjs.org/1.4.5/ $注射器/ unpr?P0 = ngHandsontableProvider%20%3 C-%20ngHandsontable%20%3 C-%20StokesTypeListController
Index.cshtml
,我用过:
<link href="@ViewBag.BaseUrl/Styles/handsontable.full.css?version=@ViewBag.AppVersion" media="screen" rel="stylesheet" />
<!------------------------------------------------------------------------lib------------------------------------------------------>
<script src="@ViewBag.BaseUrl/App/lib/jquery-2.1.1.js?version=@ViewBag.AppVersion"></script>
<script src="@ViewBag.BaseUrl/App/Lib/jquery-ui-1.12.js?version=@ViewBag.AppVersion"></script>
<script src="@ViewBag.BaseUrl/App/Lib/angular.min.js?version=@ViewBag.AppVersion"></script>
<script src="@ViewBag.BaseUrl/App/Lib/handsontable/handsontable.full.min.js?version=@ViewBag.AppVersion"></script>
<script src="@ViewBag.BaseUrl/App/Lib/angular-sanitize.min.js?version=@ViewBag.AppVersion"></script>
<script src="@ViewBag.BaseUrl/App/Lib/angualr-ui-router.min.js?version=@ViewBag.AppVersion"></script>
<script src="@ViewBag.BaseUrl/App/Lib/angular-cookies.min.js?version=@ViewBag.AppVersion"></script>
@*<script src="@ViewBag.BaseUrl/App/Lib/handsontable/pikaday.js?version=@ViewBag.AppVersion"></script>
<script src="@ViewBag.BaseUrl/App/Lib/handsontable/ZeroClipboard.min.js?version=@ViewBag.AppVersion"></script>*@
<script src="@ViewBag.BaseUrl/App/Lib/handsontable/ngHandsontable.min.js?version=@ViewBag.AppVersion"></script>
以下是Controller.JS
:
stokestypeListController.$inject = ['$scope', '$location', '$state', '$window', 'dataContext', 'ngHandsontable'] //inject dependecies required
module.controller(controllerId, stokestypeListController) // assiging controller to the module
//contstructor
function stokestypeListController($scope, $location, $state, $window, dataContext, ngHandsontable) {