-
Notifications
You must be signed in to change notification settings - Fork 0
Controller
tenowg edited this page Jun 19, 2016
·
1 revision
A Controller is the main entry point of Web Requests.
- Controllers contain light code
- Use services to do heavy lifting
- Return a
Result
@Controller('/')
@injectable()
export class IndexController extends mvcController {
constructor(userManager: UserManager) {
super(); // This is required
}
@HttpGet()
index() {
return new View(this, "index");
}
}
The @Controller()
Decorator will register all routes in your controller.
Temp Footer