generateGuid (obj, prefix) String
private
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
Please login to continue.