index for custom directive