Update controller.ts

Fix template and insert sample.