Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Ember from 'ember';
- export default Ember.Controller.extend({
- appName: 'Ember Twiddle',
- company: {
- cnpj: '64.184.287/0001-30'
- },
- templates: ['64.184.287/0001-30petition-bv2', '64.184.287/0001-30petition-bv3', 'another-value', 'another-petition'],
- companyTemplates: Ember.computed('company.cnpj', 'templates.[]', function(){
- return this.get('templates').filter(t => {
- return t.startsWith(this.get('company.cnpj'))
- }).map(t => t.replace(this.get('company.cnpj'), ''));
- }),
- });
Add Comment
Please, Sign In to add comment