我使用的是Angular.js,我使用的是polls代码。 下面是index.jade的代码:
doctype html
html(lang='en')
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1, user-scalable=no')
title= title
link(rel='stylesheet', href='//netdna.bootstrapcdn.com/bootstrap/3.0.1/ css/bootstrap.min.css')
link(rel='stylesheet', href='/stylesheets/style.css')
script(src='//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js')
script(src='//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular-resource.min.js')
body
nav.navbar.navbar-inverse.navbar-fixed-top(role='navigation')
div.navbar-header
a.navbar-brand(href='#/polls')= title
div.container
div
在运行代码时,我得到的错误为:
2
1doctype html
>; 2 html(lang='en')
3头
4元(charset='UTF-8')
5元(name='viewport',content='width=device-width,initial-scale=1,user-scalable=no')
意外的标记“缩进”
1| doctype html
> 2| html(lang='en')
3| head
4| meta(charset='utf-8')
5| meta(name='viewport', content='width=device-width, initial-scale=1, user-scalable=no')
unexpected token "indent"
html(。。。) 不应缩进(与doctype相同级别):
doctype html
html(lang='en')
head