If this is an option for you you can work around it with an arrow as a node:
Since this answer contains a mistake (nesting tikz enviroment) and there was a follow up question you can find an improved version here.
\documentclass[border=0.5cm]{standalone}
\usepackage{tikz}
\newcommand{\arrowL}{
\tikz \draw[latex-] (0,0) -- (0.1,0);
}
\newcommand{\arrowR}{
\tikz \draw[-latex] (0,0) -- (0.1,0);
}
\begin{document}
\begin{tikzpicture}
% Triangle 1
\node at (2,-1) {triangle 1};
\draw (0,0)--(4,0) node[sloped,pos=0.5]{};
\draw (4,0)--(4,4) node[sloped,pos=0.5]{\arrowR};
\draw (0,0)--(4,4) node[sloped,pos=0.5]{\arrowL};
\end{tikzpicture}
\begin{tikzpicture}
%Triangle 2
\node at (2,-1) {triangle 2};
\draw (0,0)--(4,0) node[sloped,pos=0.5]{};
\draw (4,0)--(4,4) node[sloped,pos=0.5]{\arrowR};
\draw (0,0)--(4,4) node[sloped,pos=0.5]{\arrowR};
\end{tikzpicture}
\begin{tikzpicture}
%Triangle 3
\node at (2,-1) {triangle 2};
\draw (0,0)--(0,4) node[sloped,pos=0.5]{\arrowR};
\draw (0,4)--(4,0) node[sloped,pos=0.5]{\arrowL};
\draw (0,0)--(4,0) node[sloped,pos=0.5]{};
\end{tikzpicture}
\begin{tikzpicture}
%arrows 1
\node at (2,-1) {horizontal};
\draw (0,0)--(4,0) node[sloped,pos=0.5]{\arrowL}; % makes an arrow pointing from the first coordinate to the last one to the left
\draw (0,1)--(4,1) node[sloped,pos=0.5]{\arrowR}; % makes an arrow pointing from the first coordinate to the last one to the right.
\end{tikzpicture}
\begin{tikzpicture}
%arrows 2
\node at (2,-1) {vertical};
\draw (1,0)--(1,4) node[sloped,pos=0.5]{\arrowL}; % makes an arrow pointing from the first coordinate to the last one down
\draw (2,0)--(2,4) node[sloped,pos=0.5]{\arrowR}; % makes an arrow pointing from the first coordinate to the last one up
\end{tikzpicture}
\end{document}
