added example for using directive and spans