微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决如何在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 举报,一经查实,本站将立刻删除。