equal
deleted
inserted
replaced
6 layout: layout, |
6 layout: layout, |
7 tagName: 'span', |
7 tagName: 'span', |
8 |
8 |
9 geonamesResolver: Ember.inject.service(), |
9 geonamesResolver: Ember.inject.service(), |
10 |
10 |
11 _resolveGeonamesIds: Ember.on('init', Ember.observer('url', function() { |
11 _resolveGeonamesIds: Ember.on('init', Ember.observer('url', function () { |
12 this.get('geonamesResolver').getLabel(this.get('url')).then(function(str) { |
12 this.get('geonamesResolver').getLabel(this.get('url')) |
13 this.set('resolvedLabel', str); |
13 .then(function (str) { |
14 }.bind(this)); |
14 this.set('resolvedLabel', str); |
|
15 }.bind(this)); |
15 })), |
16 })), |
16 |
17 |
17 code: Ember.computed('url', function() { |
18 code: Ember.computed('url', function () { |
18 var rawLocation = this.get('url'); |
19 let rawLocation = this.get('url'); |
19 var m = rawLocation.match(constants.GEONAMES_BASE_URLS); |
20 const m = rawLocation.match(constants.GEONAMES_BASE_URLS); |
20 |
21 |
21 if (m) { |
22 if (m) { |
22 rawLocation = rawLocation.slice(m[0].length); |
23 rawLocation = rawLocation.slice(m[0].length); |
23 } |
24 } |
24 |
25 |