Ember.generateGuid()

generateGuid (obj, prefix) Stringprivate

Defined in packages/ember-metal/lib/utils.js:129

Generates a new guid, optionally saving the guid to the object that you pass in. You will rarely need to use this method. Instead you should call Ember.guidFor(obj), which return an existing guid if available.

Parameters:

obj [Object]
Object the guid will be used for. If passed in, the guid will be saved on the object and reused whenever you pass the same object again. If no object is passed, just generate a new guid.
prefix [String]
Prefix to place in front of the guid. Useful when you want to separate the guid into separate namespaces.

Returns:

String
the guid
doc_EmberJs
2016-11-30 16:51:26
Comments
Leave a Comment

Please login to continue.