Jade difference between include and extends



  • Explain the difference between them, it was felt that inclothes were static elements that were not changing, but in blocks that used a changing content using a block.



  • Main difference includes and extends That the first supplements the content and the second changes it.

    includes used to add one contents jade In fact, this allows for the addition of a piece of code from one file to another.
    It's convenient, for example, when you need to complete some page with a new content that doesn't need the rest of the pages.

    extends Allows the content to be added and the contents of the blocks declared to be redesigned.
    It's convenient when the same block is to be removed for several pages, but with different contents.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2