update angular directive sample codes.