Use angular-ui dialog to create a new link or edit existed
Use resolve options of the angular-ui dialog in order to pass a link to edit instead of $rootScope