How can I create a base jade file for next jade files? Because if I have something like this:
base.jade
doctype html
html(ng-app='app')
head
title= title
meta(charset='utf8')
meta(name="viewport" content="width=device-width, initial-scale=1")
link(rel='stylesheet', href='/stylesheets/style.css')
link(rel='stylesheet', href='/stylesheets/bootstrap.css')
base(href='/')
body
.container(ui-view)
script(src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js")
script(src="/javascripts/bootstrap.js")
script(src='/javascripts/angular.js')
script(src='/javascripts/angular-ui-router.js')
script(src='/javascripts/app.js')
home.jade
extends base
h1 Welcome
it loops itself and I get "WARNING: Tried to load angular more than once." because in ui-view it's re-rendering base.jade again and again
when I remove this line "extends base" stuff in home.jade is rendering but without base.jade
edit:
app.js (angular)
app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function($stateProvider, $urlRouterProvider, $locationProvider) {
$urlRouterProvider.otherwise('/');
$locationProvider.html5Mode(true);
$stateProvider
.state('home', {
url: '/',
templateUrl: '/views/home'
})
.state('login', {
url: '/users/login',
templateUrl: '/views/login'
})
}
]);
if its like that then I get 404 not found views/login but if I change it to /views/login.jade then I get jade file but not compiled... so it works, but how to get compiled file?