add main path for directive
update example for path attr