我以为在Jade文件中可以直接写纯HTML作为输入,但是尝试后出现了错误。
对于这个HTML:
div(ng-controller="TestController")
h1 Services list
ul(ng-model="test")
li(ng-repeat="item in items")
a
| {{ item.name }}
div(ui-view)
我收到了以下错误信息。
Running "watch" task
Waiting...
>> File "app/frontend/views/home.jade" changed.
Running "jade:compile" (jade) task
>> Error: app/frontend/views/home.jade:2
>> 1| <b>hello </b> test
>> > 2| <ul ng-model="test">
>>
>> unexpected token "indent"
Warning: Jade failed to compile "app/frontend/views/home.jade".
>> Destination not written because compiled files were empty.
>> 5 files created.
Running "watch" task
Waiting...