refactor index and projects to angular directives