Last active
January 31, 2018 21:00
-
-
Save ASH-Bryan/21c6f22c21b5ac8d23a51c18d30aaa0e to your computer and use it in GitHub Desktop.
Unique Array
This file contains 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
simpleYears: Ember.computed('newsletters', function() { | |
const years = [2015, 2015, 2015] | |
console.log(years) | |
return years | |
.map(item => item) | |
.uniq() | |
}), | |
years: Ember.computed('newsletters', function() { | |
return this.get('newsletters') | |
.map(item => item.Year) | |
.uniq() | |
}), | |
newsletters: [ | |
{ | |
"id": 0, | |
"Year": 2016, | |
"ImageSource": "/files/M965-115A-Q3%20AF%20Newsletter_Quarter_3_450%20X%20582_tcm39-118170.jpg", | |
"Link": "/files/M965-115A-Q3%20AF%20Newsletter_Quarter_3_tcm39-118171.pdf", | |
"Summary": "This edition of the Active&Fit® newsletter illustrates how “intrinsic motivators” can help you meet your goals, details why rowing ranks as one of the best exercises, offers tips to cope with workout burnout, and goes over new cholesterol guidelines.", | |
"Title": "Active&Fit Newsletter Volume 7, Issue 3" | |
}, | |
{ | |
"id": 0, | |
"Year": 2016, | |
"ImageSource": "/files/M965-115A-Q3%20AF%20Newsletter_Quarter_3_450%20X%20582_tcm39-118170.jpg", | |
"Link": "/files/M965-115A-Q3%20AF%20Newsletter_Quarter_3_tcm39-118171.pdf", | |
"Summary": "This edition of the Active&Fit® newsletter illustrates how “intrinsic motivators” can help you meet your goals, details why rowing ranks as one of the best exercises, offers tips to cope with workout burnout, and goes over new cholesterol guidelines.", | |
"Title": "Active&Fit Newsletter Volume 7, Issue 3" | |
}, | |
{ | |
"id": 0, | |
"Year": 2016, | |
"ImageSource": "/files/M965-115A-Q3%20AF%20Newsletter_Quarter_3_450%20X%20582_tcm39-118170.jpg", | |
"Link": "/files/M965-115A-Q3%20AF%20Newsletter_Quarter_3_tcm39-118171.pdf", | |
"Summary": "This edition of the Active&Fit® newsletter illustrates how “intrinsic motivators” can help you meet your goals, details why rowing ranks as one of the best exercises, offers tips to cope with workout burnout, and goes over new cholesterol guidelines.", | |
"Title": "Active&Fit Newsletter Volume 7, Issue 3" | |
} | |
] | |
}); |
This file contains 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
{ | |
"version": "0.13.0", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.16.2", | |
"ember-template-compiler": "2.16.2", | |
"ember-testing": "2.16.2" | |
}, | |
"addons": { | |
"ember-data": "2.16.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment