Using template: 'test',
works, but replacing that line with templateUrl: 'static/app/partials/filter.html',
does not do anything, I assume because the partial is never found (but haven't verified this). The path to filter.html
is Project/app/static/app/partials/filter.html
, where Project
is located under C:\Users\david\Dropbox\JetBrains\
This is used in conjunction with a Django project, and I've been following the example set by a DjangoCon demonstration with Angular where their properly working templateUrl is templateUrl: 'static/tweeter/partials/tweet-list.html',
I've tried variations on the templateUrl in assumption that this is the problem, by removing and adding various layers of directories. If this is a directory path problem, what directory am I supposed to use as a reference?
Sorry I can't figure out how to link to plnkr, I'll just copy the code here:
index:
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-resource.min.js"></script>
<script data-require="ui-router@*" data-semver="0.2.15" src="http://rawgit.com/angular-ui/ui-router/0.2.15/release/angular-ui-router.js"></script>
</head>
<body ng-app="mapApp">
<div ui-view>
<p>test failed</p>
</div>
</body>
</html>
partial:
<h1>test success</h1>
js:
angular
.module('mapApp', ['ui.router'])
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('test', {
url: '/',
templateUrl: 'filter.html',
});
})