Pass in your custom key, in this case projectKey which is a variable you populate from somewhere:
private whatEverName(projectKey) {
this.projectKey = projectKey;
this.af.object('/Projects/' + this.projectKey);
}
Call whatEverName(projectKey) in your code somewhere and you have a custom node key. This advice is current as of 25 July, 2017.
I've added a bit more here to help those who are trying to create a child node to the one above with another push key as a custom key. This is useful for an association index under that project, such as a list of users working on that project. You may not want this list in the project data but get it by query. This makes it easier to denormalize the data and have a flatter architecture, the Firebase goal.
That association node is called ProjectsMembers in this case and we are recording the project's owner in it. Add other user nodes the same way. Notice the backticks!!! Single quotes won't work. In this case I set an owner name as a reference to push key. Easier to read in the db.
// Add child node with project key as push key to the association index.
this.af.object(`ProjectsMembers/${projectKey}/` + this.ownerKey)
.set({ ownerName: this.ownerName });