我有一个名为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' });
};
});