Open evanplaice opened 8 years ago
Agreed. This will require a small change on the HackMyResume side to support default "show" or "hide" state for sections. Thanks~
Gotcha. I just wrap the partial template with a conditional to only render if data is present.
<template [ngIf]="!empty()">
<hr>
<section id="education">
<header title="Education"><span class="fa fa-lg fa-mortar-board"></span></header>
<div *ngFor="#school of education.history">
<h3><template [ngIf]="school.title">{{ school.title }}, </template>{{ school.institution }}</h3>
<duration [start]="school.start" [end]="school.end"></duration>
<p>{{ school.summary }}<p>
<curriculum [curriculum]="school.curriculum"></curriculum>
</div>
</section>
</template>
The template element here is used because it doesn't show up in the rendered output. So, in this case if the data model in the controller returns not empty, the contents get rendered.
BTW, I hope you don't mind me flooding the issues. I like to get all the known required tasks added up front so there's a central place to add notes as progress is made. I figure, start with the data structures and work from there.
Very cool to see the Angular interpretation here. Any reason not to use the {{#section}}
block helper?
{{#section 'education' 'Work'}}
/* Render when 'education' is present and > 0 entries. */
{{/section}}
It's maybe a little explicit, but each {{#section}}
block partial is also a hint to the HMR (or other tool) runtime that "this is a section", for stuff like renaming or reordering sections and the like, as well as providing conditional rendering. Not required though.
And re: submitting issues: user & developer involvement are actually valued here. Submit as many issues or PRs as you think deserve attention. Thanks!
Oh, also, I meant that disposition
contains sensitive info, and HMR should support a flag in the .json
as well as command line to show or hide at will based on whether it's a private resume for a specific employer or a public resume for the blog, etc.
@hacksalot that's what it uses at the higher level except instead of using a generic wrapping element, it uses a semantically named custom element.
Here's the element used on the parent view. resume.education
is a reference to the resume data used in this partial that gets passed in as an input parameter and assigned to this.education
within the EducationComponent
partial.
<education [education]="resume.education"></education>
If you look at the previous example above, I've also created subpartial views for <header>
, <curriculum>
, and <duration>.
There are a few others not shown here such as <highlights> and <keywords>
.
Gotcha, so disposition needs a private
field. Makes sense.
The
disposition
section was added to FRESCA. It needs a template partial.