Initial commit
This commit is contained in:
6
app/components/nav-link-to.js
Normal file
6
app/components/nav-link-to.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.LinkComponent.extend({
|
||||
tagName: 'a',
|
||||
classNames: ['item']
|
||||
});
|
||||
19
app/components/search-form.js
Normal file
19
app/components/search-form.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
placeholder: "Ввведите название населенного пункта",
|
||||
searchText: "",
|
||||
store: Ember.inject.service('store'),
|
||||
|
||||
actions: {
|
||||
search(param) {
|
||||
if (param !== '') {
|
||||
this.get('store').query('find-result', {text: param}).then((result) => {
|
||||
this.set('model', result);
|
||||
});
|
||||
} else {
|
||||
this.set('model', null);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user