added examples to templates and js controller