What is the difference between continuation and inclusion in jade?

With both of these commands, I can use the code from another file. As I see it, when we use extends file.jade , we can use block to change the blocks in file.jade before compiling. But is that the only difference, and am I right? Thanks.

+5
source share
1 answer

Well, as @laggingreflex wrote above, there are documents on these commands: extends and include .

Extra points: you can use include for different files, and not just for jade files. Alternatively, you can use include several times on the page. This command simply inserts the contents of another file directly into place. You can look at it as if you had done a large Lego project using (including) various small pieces.

Extends contrast, take a large Lego project and replace the marked blocks with your parts with the special block command. You can use it once and overwrite the contents of the target file (file using the Extends ).

+4
source

All Articles