我遇到的问题是我的Mac机器上运行正常,但是当它迁移到Ubuntu时,我收到了这个错误。
这是我的index.jade部分
.container-fluid
.row
.jumbotron
center
h2 {{message}}
.container
center
h2 Line Items
table
tr
th File Name
th File Type
th ID
tr
tr(ng-repeat="infos in info")
td {{infos.filename}}
td {{infos.type}}
td {{infos.id}}
.container
form(name="metadata" ng-class="{ 'has-error': userForm.email.$invalid }")
div.row
div.col-md-4(style="background-color:#eee;height:200px")
center
h1 Resource Type
h3 Enter the type of file you are trying to upload
strong Sound Recording / Image
div
center
select(name="type" ng-model="file.type")
option Sound Recording
option Image
div.col-md-4(style="background-color:#eee;height:200px")
center
h1 File Name
h3 Enter the name of the file
input(name="filename" ng-model="file.name" placeholder="filename.wav / image.jpg")
div.col-md-4(style="background-color:#eee;height:200px")
center
h1 ISRC
h3 Enter the ISRC Number
input(name="isrc" ng-model="file.isrc" placeholder="Your ID")
button.btn.btn-primary(ng-click="save(file)") Submit
这给了我错误:
Error: /home/me/dashboards/angular-express-seed/views/partials/index.jade:48
46|
47|
48 |
第141行:意外的标识符
我在该行上没有任何内容,因此文档中的其他地方可能存在问题。
此外 - 正在运行jade ./views/partials/index.jade
返回rendered index.html
非常感谢任何帮助。
答案 0 :(得分:1)
这是语法
的问题form(name="metadata" ng-class="{ 'has-error': userForm.email.$invalid }")
下面应该用逗号
form(name="metadata", ng-class="{ 'has-error': userForm.email.$invalid }")
适用于具有属性的所有标记。不确定它在Mac上是如何工作的,因为它应该给出相同的错误。