fundamental.js /doc/MainRouter.html

Language HTML Lines 66
MD5 Hash c074a88910d9e324bcf0b857085e4de8
Repository git://github.com/radekstepan/fundamental.js.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
  <title>MainRouter.js</title>
  <link rel="stylesheet" href="pycco.css">
</head>
<body>
<div id='container'>
  <div id="background"></div>
  
  <table cellspacing=0 cellpadding=0>
  <thead>
    <tr>
      <th class=docs><h1>MainRouter.js</h1></th>
      <th class=code></th>
    </tr>
  </thead>
  <tbody>
    <tr id='section-0'>
      <td class=docs>
        <div class="octowrap">
          <a class="octothorpe" href="#section-0">#</a>
        </div>
        <h2>Main App Router</h2>
      </td>
      <td class=code>
        <div class='highlight'><pre><div class="highlight"><pre><span class="nx">App</span><span class="p">.</span><span class="nx">Routers</span><span class="p">.</span><span class="nx">Main</span> <span class="o">=</span> <span class="nx">Backbone</span><span class="p">.</span><span class="nx">Router</span><span class="p">.</span><span class="nx">extend</span><span class="p">({</span>

    <span class="nx">initialize</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">options</span><span class="p">)</span> <span class="p">{</span></pre></div></pre></div>
      </td>
    </tr><tr id='section-1'>
      <td class=docs>
        <div class="octowrap">
          <a class="octothorpe" href="#section-1">#</a>
        </div>
        <p>Initialize new <strong>Todos Collection</strong> and fetch them from db.</p>
      </td>
      <td class=code>
        <div class='highlight'><pre><div class="highlight"><pre>    	<span class="nx">App</span><span class="p">.</span><span class="nx">Models</span><span class="p">.</span><span class="nx">Todos</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">TodoList</span><span class="p">;</span>
		<span class="nx">App</span><span class="p">.</span><span class="nx">Models</span><span class="p">.</span><span class="nx">Todos</span><span class="p">.</span><span class="nx">fetch</span><span class="p">();</span></pre></div></pre></div>
      </td>
    </tr><tr id='section-2'>
      <td class=docs>
        <div class="octowrap">
          <a class="octothorpe" href="#section-2">#</a>
        </div>
        <p>Instantiate the main <strong>Views</strong>.</p>
      </td>
      <td class=code>
        <div class='highlight'><pre><div class="highlight"><pre>        <span class="k">new</span> <span class="nx">App</span><span class="p">.</span><span class="nx">Views</span><span class="p">.</span><span class="nx">CreateTodoView</span><span class="p">;</span>
        
		<span class="k">new</span> <span class="nx">App</span><span class="p">.</span><span class="nx">Views</span><span class="p">.</span><span class="nx">TodoStatsView</span><span class="p">;</span>

        <span class="k">new</span> <span class="nx">App</span><span class="p">.</span><span class="nx">Views</span><span class="p">.</span><span class="nx">TodoListView</span><span class="p">;</span>
    <span class="p">}</span>

<span class="p">});</span>

</pre></div></pre></div>
      </td>
    </tr>
  </table>
</div>
</body>
Back to Top