错误:$ injector:modulerr模块错误,角度材料?

时间:2017-03-11 06:51:27

标签: angularjs angular-material

我想使用角度材质的对话框,我将ngMaterial依赖项添加到我的模块中,并在布局页面中引用角度材质,并将$mdDialog添加到控制器, 这是我的模块:

var tapp = angular.module('tApp', ['ngRoute', 'ngAnimate', 'ngMaterial']);

和控制器:

tapp.controller('tCtrlr', function ($scope, $http, $mdDialog) {//code})

这是所有库引用

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - My ASP.NET Application</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    <script src="~/Scripts/angular.min.js"></script>
    <script src="~/Scripts/angular-route.min.js"></script>
    <script src="~/Scripts/angular-animate.min.js"></script>
    <script src="~/Scripts/angular-material/angular-material.min.js"></script>
    <script src="~/Scripts/angular-material/angular-material-mocks.js"></script>
    <script src="~/Scripts/ngApp/_TApp.js"></script>
    <script src="~/Scripts/ngApp/_TController.js"></script>

</head>

仍然有此错误

  

$ injector:modulerr模块错误

1 个答案:

答案 0 :(得分:2)

您缺少角度材料所需的必要参考,

添加以下内容,

import t1

t1.f1()
print(t1.v1)