The following code works if i was rendering some.html instead of some.jade.
angular.module('myApp', []). config(['$routeProvider', function($routeProvider) { $routeProvider. when('/', {templateUrl: 'partials/some.jade', controller: myAppController}). otherwise({redirectTo: '/login'}); }]); Is it possible to render a jade file as a partial in angular?
Yes it is possible. Look at the following link
Two important points to note are:
templateUrl: 'partials/some' instead of templateUrl: 'partials/some.jade' andAdd the following in routes: ( the code is for expressjs in node)
app.get('/partials/:name', function (req, res) { var name = req.params.name; res.render('partials/' + name); });` Quit and relaunch node/express server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With