Question App in Nodejs, Pug, Express, Include Partials 3

Channel:
Subscribers:
8,020
Published on ● Video Link: https://www.youtube.com/watch?v=3o2XaHeMyYw



Duration: 6:46
212 views
3


In this Nodejs express tutorial we look at creating partials out of our templates. In this specific expressjs tutorial we look at separating our code into its own file. What I mean by this is, we take the code that is being repeated and inserting into a layout file ('layout.pug') and we insert our page in between the boilerplate code (the code we repeat). This includes the DOCTYPE declaration. We also separate the header and the footer into their own individual files which we likewise include in our layout file. Pug allows us to do this using a few keywords such as "include" to include our header and footer files, and extend to allow a file to be extended to our layout file.




Other Videos By We Will Code


2018-08-30freeCodeCamp's Intro to the Applied Visual Design Challenges
2018-08-21freeCodeCamp Basic CSS, Use Hex and RGB to Mix Colors, CSS Variables, & Style Fallbacks 6
2018-08-14freeCodeCamp Basic CSS,Clockwise Notation for Padding & Margin, CSS Precedence Specificity 5
2018-08-07freeCodeCamp Basic CSS, Size Images, Setting Id's, Margins, Paddings, & Borders 4
2018-08-02freeCodeCamp Basic CSS, Change Element Colors,Class Selector, Font Degradation 3
2018-07-20freeCodeCamp Basic HTML5 Nest an Anchor - Head and Body of HTML Doc 2
2018-07-18freeCodeCamp Basic HTML Tutorial Say Hello - Link to Internal Sections w Anchor Elements 1
2018-07-12Question App in Nodejs, Pug,Redirects and Cookie Practice
2018-07-09Question App in Nodejs, Pug,cookie-parser, setting cookies 5
2018-06-29Question App in Nodejs, Pug, Body-Parser Parsing Form Data 4
2018-06-27Question App in Nodejs, Pug, Express, Include Partials 3
2018-06-26Question App in Nodejs, Pug, Express, Rendering Response 2
2018-06-25Question App in Nodejs, Express, Flash Card App with Pug Templating
2018-06-22Codecademy's Learn Express, Matching Longer Paths, ExpressJS
2018-06-21Codecademy's Learn Express, Setting Status Codes
2018-06-19Codecademy's Learn Express, Getting a Single Expression
2018-06-18Codecademy's Learn Express, Matching Route Paths, Understanding Express JS
2018-06-15Codecademy's Learn Express, Sending a Response, Nodejs Backend
2018-06-14Codecademy's Learn Express, Writing Your First Route
2018-06-13Codecademy's Learn Express, Starting a Server, Back-End Apps
2018-06-13Learn Express JS, Back-End Programming Tutorial, Codecademy



Tags:
Express tutorial
learning express
express js
express routes
pug partials
pug tutorial