Implementing the symbol view

Let's create a new file named symbol_view.ts under the app/views directory. The SymbolView view receives the stock data formatted by the QuoteModel model through the mediator using the app.view.symbol.render event:

/// <reference path="../../framework/interfaces"/>

import { View, AppEvent,ViewSettings } from "../../framework/framework";

@ViewSettings("./source/app/templates/symbol.hbs", "#outlet")
class SymbolView extends View implements IView {

  constructor(metiator : IMediator) {
    super(metiator);
  }

This view is just like MarketView; it subscribes to some events using the initialize method, and later disposes of those events using the dispose method. The SymbolView view can also initialize and dispose of user events ...

Get TypeScript: Modern JavaScript Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.