By default, all files in the web-app folder are copied to a folder named static in war . (You can change this behavior. See Grails Documentation ).
In your example, you can check for partial files in the following URLs.
http://localhost:8080/yourApp/static/js/partials/invoices-list.html http://localhost:8080/yourApp/static/js/partials/invoices-details.html http://localhost:8080/yourApp/static/js/partials/dashboard.html
So, you need to find out the path to these files. Something like that:
angular.module('myapp', []). config(['$routeProvider', function($routeProvider) { $routeProvider .when('/invoices', { templateUrl: '../static/js/partials/invoices-list.html', controller: InvoiceListCtrl }) .when('/invoices/:invoiceId', { templateUrl: '../static/js/partials/invoice-details.html', controller: InvoiceDetailCtrl} ) .otherwise({redirectTo: '/dashboard'}, { templateUrl: '../static/js/partials/dashboard.html', controller: DashboardCtrl }); }]);
It is important to note that the templateUrl path must not be associated with a JS file.
Another example:
grails-app views mydomain index.gsp web-app js partials mydomain-detail.html mydomain-list.html controllers mydomain-controllers.js
Resources:
http://localhost:8080/myApp/mydomain/ http://localhost:8080/myApp/static/js/partials/mydomain-detail.html http://localhost:8080/myApp/static/js/partials/mydomain-list.html
Route Configuration:
angular.module('myapp', []). config(['$routeProvider', function($routeProvider) { $routeProvider .when('/list', { templateUrl: '../static/js/partials/mydomain-detail.html', controller: MyDomainListCtrl }) .when('/show/:id', { templateUrl: '../static/js/partials/mydomain-detail.html', controller: MyDomainDetailCtrl} ) .otherwise({ redirectTo: '/list' }); }]);