Skip to content

Instantly share code, notes, and snippets.

@aa6my
Created June 2, 2021 09:13
Show Gist options
  • Select an option

  • Save aa6my/e9fcc0e0aa2f457a2c8a01f1ce66cd07 to your computer and use it in GitHub Desktop.

Select an option

Save aa6my/e9fcc0e0aa2f457a2c8a01f1ce66cd07 to your computer and use it in GitHub Desktop.
Custom
Vue.component('careers', {
template: '<div>A custom component!</div>',
data: function() {
var careerData = [];
client.getEntries()
.then(function (entries) {
// log the title for all the entries that have it
entries.items.forEach(function (entry) {
if(entry.fields.jobTitle) {
careerData.push(entry);
}
})
});
return careerData;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment