added angular and rails controllers for templates and lessons