Django - 如何定义命名路由?

时间:2015-08-22 11:57:25

标签: html django-views

我有一个名为base.html的html文件,如下所示:

<html ng-app="exampleApp">
<head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="static/js/angular.min.js"></script>
    <script src="static/js/app.js"></script>
</head>
<title> Heloow</title>
<body ng-controller="MainCtrl">
{% verbatim%}
<a href="{% url 'responsive' %}" class="btn btn-lg btn-primary" ng-click="clickToOpen()">Next >> </a>
{% endverbatim %}
</body>
</html>

我的app.js如下:

var app = angular.module('exampleApp', ['ngDialog']);

app.controller('MainCtrl', function ($scope, ngDialog) {
    $scope.clickToOpen = function () {
        ngDialog.open({ template: 'view.html' });
    };
});

但是当我加载页面时出现如下错误,请帮助。提前致谢。 enter image description here

0 个答案:

没有答案