Skip to content

Instantly share code, notes, and snippets.

@sarus
sarus / components.user-portrait.js
Last active August 28, 2019 18:57 — forked from alexdiliberto/components.user-portrait.js
Polarity Sample Application
import Ember from 'ember';
import Component from '@ember/component';
export default Component.extend({
numberOfSaves: 0,
message: '',
helloMessage: Ember.computed('username', function() {
return `Hello, ${this.get('username')}. Welcome!`;
}),
import Ember from 'ember';
export default Ember.Component.extend({
numberOfSaves: 0,
message: '',
actions:{
clear: function(){
this.set('numberOfSaves', 0);
this.set('message', '');
},
// Select box utilizing Select2 functionality that overrides Ember.Select;
// Define view in the same way that you would an Ember.Select view.
// Additional attributes supported are: width, allowClear, and closeOnSelect;
// Example view:
// {{ view App.Select2
// viewName="fieldValueSelect2"
// prompt="Please select a value list"
// contentBinding="controller.fieldValuesLists"
// optionLabelPath="content.name"
// optionValuePath="content.id"