Github user corneadoug commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/580#issuecomment-167915875
A few changes that would simplify the code:
* Reduce the event type to `NEW_NOTE` only instead of having both
`NEW_NOTE` and `CLONE_NOTE`
(Since copy and create is making a new note anyway)
* Make the location change directly inside `websocketEvents.factory.js` and
remove `$scope.$on('createNoteContent` from `notename.controller.js`
it would looke like this:
```
if (op === 'NOTE') {
$rootScope.$broadcast('setNoteContent', data.note);
} else if (op === 'NEW_NOTE') {
$location.path('notebook/' + data.note.id);
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---