Learn about how to work with dynamic data with your view template.
- [Instructor] It's time to start working with our Vapor…data and our Leaf template.…So let's go ahead and select welcome.leaf.…We're going to start with the ("body") tag,…as the ("head") tag is pretty much…sorted out for us already.…I'm first going to create a <div> foreign icon…that I want to display.…Recalling the app.css file that we imported to our project,…I've created a class for the different types…of possible weather statuses…that are going to be returned to us by the API.…And for each of them I'm selecting…a different background image.…
So for this <div> I want to set the class name…to be dynamically provided to us by the API,…so that based on the weather given to us,…it's going to select the proper image.…Let me go 'head and import that code now.…So in line twelve, what I'm simply doing here…is I'm setting the class property of this <div> tag…to be the icon value that we're going to return…from our Vapor project.…
And I'm using the Vapor tag #,…and then I'm entering the parameter of icon.…Next, I'm going to put up an <h2> tag,…
- Reviewing the concept of server-side Swift
- Installing Vapor in a local environment
- Creating a new Vapor project
- Reviewing Vapor's built-in capabilities to interact with external services
- Registering and authenticating with the Dark Sky API
- Working with Leaf templates
- Setting up a Heroku account
- Using common troubleshooting techniques
Skill Level Intermediate
Core Data for iOS and macOS Enterprise Developerswith Jon Bott1h 46m Intermediate
1. Open-Source Swift and Vapor Background
2. Vapor's System Layer
3. Working with Vapor
4. View Templating
5. Deploying to Heroku
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.