如何在HTML文件外部文件或HTML文件内部中插入原始Pug代码

问题描述

我想将一些多行Pug放入HTML文件中,但找不到有关如何执行此操作的信息。我正在使用Angular,并且对编程也很陌生。

var cards = [{ title: 'Mountain View',copy: 'Check out all of these gorgeous mountain trips with beautiful views of,you guessed it,the mountains',button: 'View Trips' },{ title: 'To The Beach',copy: 'Plan your next beach trip with these fabulous destinations',{ title: 'Desert Destinations',copy: 'It\'s the desert you\'ve always dreamed of',button: 'Book Now' },{ title: 'Explore The galaxy',copy: 'SerIoUsly,straight up,just blast off into outer space today',button: 'Book Now' }]

mixin card(title,copy,button)
  .card
    .content
      h2.title= title
      p.copy= copy
      button.btn= button

main.page-content
  each card in cards
    +card(card.title,card.copy,card.button)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)