# how to add word in the line?

I want to add the word in the line using the bellow code, now the picture is :

I want to add the word "p1" in the line between "a" and "b" which looks like:

I try to modify the code to \path [line] (a) -- (b){p1}; but there is an error.

\usetikzlibrary{shapes,arrows,positioning}
\usepackage{wrapfig}
\usepackage{graphicx}
\resizebox{.4\textwidth}{!}{\begin{tikzpicture}[
block/.style = {circle, draw,align=center,text width = 0.1cm, inner sep = 0.1cm},
line/.style = {draw,thick, -latex'},
node distance=0.9cm and 0.4cm
]

% Place nodes
\node [block] (a) {a};
\node [block, below left of=a,xshift=-1.0cm, yshift=-0.3cm] (b) {b};
\node [block, below right of=a,xshift=1.0cm, yshift=-0.3cm] (c) {c};
% Draw edges
\path [line] (a) -- (b);
\path [line] (a) -- (c);

\end{tikzpicture}}

-
\path [line] (a) -- node [sloped] {p1} (b)

You can also include pos=0.5 to specify where the node line it should be place. While code snippets are useful in explanations, it is always best to post a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages. –  Peter Grill Aug 14 '12 at 14:45