gpt4 book ai didi

html - 在 Jade 中编写纯 HTML

转载 作者:太空宇宙 更新时间:2023-11-04 13:13:26 26 4
gpt4 key购买 nike

我认为可以在 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...

最佳答案

显然是从管道开始 |这应该有效

| Plain text can include <strong>html</strong>
p
| It must always be on its own line

jade-lang.com/reference/plain-text


输出纯文本应该是这样的:

pre
<div>Stuff</div>

关于html - 在 Jade 中编写纯 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30868270/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com