An another answer that gives a command equivalent to the PSTricks \ncbar command :

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\tikzset{% TikZ equivalent to the PSTricks \ncbar command
label anchor/.initial={west},%
label rotate/.initial={0},%
arm angleA/.initial={0},%
arm lengthA/.initial={1em},%
}
\newcommand{\anchorL}{\pgfkeysvalueof{/tikz/label anchor}}%
\newcommand{\rotateL}{\pgfkeysvalueof{/tikz/label rotate}}%
\newcommand{\angleA}{\pgfkeysvalueof{/tikz/arm angleA}}%
\newcommand{\lengthA}{\pgfkeysvalueof{/tikz/arm lengthA}}%
\tikzstyle{arrow}=[->, >=stealth, thick, shorten <= 3pt, shorten >= 3pt]%
\newcommand{\nbar}[4][]{% \nbar[options]{node A}{node B}{label}
\begin{tikzpicture}[remember picture,overlay,#1]
\coordinate (p1) at ($(#2)+(\angleA:\lengthA)$) ;
\coordinate (p2) at ($(#3)+(\angleA:\lengthA)$) ;
\pgfmathanglebetweenpoints{\pgfpointanchor{p1}{center}}
{\pgfpointanchor{p2}{center}}
\pgfmathnotless{cos(\pgfmathresult-\angleA)}{0}
\ifnum\number\pgfmathresult=1
% Find the projection of the p2 point on the line from #2 to p1
\coordinate (inter) at ($(#2)!(p2)!(p1)$) ;
\draw[arrow] (#2) -- (inter) -- (p2) -- (#3) ;
\path (inter) -- (p2) node[rotate=\rotateL,anchor=\anchorL,midway]{#4} ;
\else
% Find the projection of the p1 point on the line from #3 to p2
\coordinate (inter) at ($(#3)!(p1)!(p2)$) ;
\draw[arrow] (#2) -- (p1) -- (inter) -- (#3) ;
\path (p1) -- (inter) node[sloped,rotate=\rotateL,anchor=\anchorL,midway]{#4} ;
\fi
\end{tikzpicture}}
\newcommand{\node}[3][]{% \node[options]{node's name}{my node}
\tikz[remember picture,baseline = (#2.base)] \node[#1] (#2) {$#3$};}
\renewcommand{\node}[3][]{% \node[options]{node's name}{my node}
\tikz[remember picture,baseline = (#2.base)] \node[#1] (#2) {#3};}
\begin{minipage}{10cm}
\begin{center}
\node[circle,dashed,draw]{A}{Node A}
\hspace*{3cm}
\raisebox{-10mm}{\node[draw]{B}{Node B}}
\end{center}
\end{minipage}
\nbar[red, arm angleA=70, arm lengthA=5mm,
label anchor=south,label rotate=\angleA-90]{A.\angleA}{B.\angleA}{label}
\nbar[green, arm angleA=150, arm lengthA=5mm,
label anchor=0,label rotate=-90]{A.\angleA}{B.\angleA}{label}
\nbar[blue, arm angleA=-90, arm lengthA=5mm,
label anchor=north,label rotate=0]{A.\angleA}{B.\angleA}{label}
\end{document}