MapWithDefault#copy()

copyEmber.MapWithDefaultprivate Inherited from Ember.Map but overwritten in packages/ember-metal/lib/map.js:468 Returns: Ember.MapWithDefault

Routes and Templates

Routes and Templates Ember uses routes to define logical, addressable pages within our application. In Super Rentals we want to arrive at a home page which shows a list of rentals. From there, we should be able to navigate to an about page and a contact page. Let's start by building our "about" page. Remember, when the URL path /about is loaded, the router will map the URL to the route handler of the same name, about.js. The route handler then loads a template. An About Route If we run ember

Ember.computed.sum()

sum (dependentKey) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/reduce_computed_macros.js:63 Available since 1.4.0 A computed property that returns the sum of the values in the dependent array. Parameters: dependentKey String Returns: Ember.ComputedProperty computes the sum of all values in the dependentKey's array

DS.Model#id

id{String} Defined in addon/-private/system/model/model.js:282 All ember models have an id property. This is an identifier managed by an external source. These are always coerced to be strings before being used internally. Note when declaring the attributes for a model it is an error to declare an id attribute. var record = store.createRecord('model'); record.get('id'); // null store.findRecord('model', 1).then(function(model) { model.get('id'); // '1' });

Test#onInjectHelpers()

onInjectHelpers (callback) public Defined in packages/ember-testing/lib/test/on_inject_helpers.js:3 Used to register callbacks to be fired whenever App.injectTestHelpers is called. The callback will receive the current application as an argument. Example: Ember.Test.onInjectHelpers(function() { Ember.$(document).ajaxSend(function() { Test.pendingRequests++; }); Ember.$(document).ajaxComplete(function() { Test.pendingRequests--; }); }); Parameters: callback Function Th

HashLocation#replaceURL()

replaceURL (path) private Defined in packages/ember-routing/lib/location/hash_location.js:86 Uses location.replace to update the url without a page reload or history modification. Parameters: path String

Ember.mixin()

mixin (obj, mixins) private Defined in packages/ember-metal/lib/mixin.js:386 Parameters: obj mixins Returns: obj

Route#templateName

templateNameStringpublic Defined in packages/ember-routing/lib/system/route.js:504 Available since 1.4.0 The name of the template to use by default when rendering this routes template. let PostsList = Ember.Route.extend({ templateName: 'posts/list' }); App.PostsIndexRoute = PostsList.extend(); App.PostsArchivedRoute = PostsList.extend(); Default: null

DS.JSONAPIAdapter#pathForType()

pathForType (modelName) String Inherited from DS.BuildURLMixin but overwritten in addon/adapters/json-api.js:129 Parameters: modelName String Returns: String path

HashLocation#getURL()

getURLprivate Defined in packages/ember-routing/lib/location/hash_location.js:42 Returns the normalized URL, constructed from location.hash. e.g. #/foo => /foo as well as #/foo#bar => /foo#bar. By convention, hashed paths must begin with a forward slash, otherwise they are not treated as a path so we can distinguish intent.