update angular js directive code samples.