Created
June 2, 2021 09:13
-
-
Save aa6my/e9fcc0e0aa2f457a2c8a01f1ce66cd07 to your computer and use it in GitHub Desktop.
Custom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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