ember-select-2
ember-select-2 copied to clipboard
Ember.String.fmt is deprecated in Ember 2+
Looks like they have decided to drop it.
https://github.com/emberjs/ember.js/issues/10848
Its used here (https://github.com/iStefo/ember-select-2/blob/9df55428350142de9bb863c625938d43cac86616/addon/components/select-2.js#L249)
/*
Format the no matches message, substituting the %@ placeholder with the
html-escaped user input
*/
options.formatNoMatches = function(term) {
var text = self.get('typeaheadNoMatchesText');
if (text instanceof Ember.Handlebars.SafeString) {
text = text.string;
}
term = Ember.Handlebars.Utils.escapeExpression(term);
return Ember.String.htmlSafe(Ember.String.fmt(text, term));
};
And here (https://github.com/iStefo/ember-select-2/blob/9df55428350142de9bb863c625938d43cac86616/addon/components/select-2.js#L259)
/*
Format the error message, substituting the %@ placeholder with the promise
rejection reason
*/
options.formatAjaxError = function(jqXHR, textStatus, errorThrown) {
var text = self.get('typeaheadErrorText');
return Ember.String.htmlSafe(Ember.String.fmt(text, errorThrown));
};
+1