How to have text next to line instead of on the line?

I have nodes connected with links and link can have names like after loop as shown in image , i want to have next to link instead of on the link, how can i achieve it?

GoJS Link Labels -- Northwoods Software talks about how to position link labels in various manners.