title: Zend Framework 2: Navigation
body: <p>In my controller I create the Navigation object and passing it to the view</p>
  
  <pre><code>$navigation = new \Zend\Navigation\Navigation(array(
      array(
              'label' =&gt; 'Album',
              'controller' =&gt; 'album',
              'action' =&gt; 'index',
              'route' =&gt; 'album',
          ),
      ));
  </code></pre>
  
  <p>There trying to use it</p>
  
  <pre><code>&lt;?php echo $this-&gt;navigation($this-&gt;navigation)-&gt;menu() ?&gt;
  </code></pre>
  
  <p>And get the error:</p>
  
  <blockquote>
    <p>Fatal error: Zend\Navigation\Exception\DomainException: Zend\Navigation\Page\Mvc::getHref cannot execute as no Zend\Mvc\Router\RouteStackInterface instance is composed in Zend\View\Helper\Navigation\AbstractHelper.php on line 471</p>
  </blockquote>
  
  <p>But navigation which I use in layout, so as it is written here: <a href="http://adam.lundrigan.ca/2012/07/quick-and-dirty-zf2-zend-navigation/" rel="noreferrer">http://adam.lundrigan.ca/2012/07/quick-and-dirty-zf2-zend-navigation/</a> works. What is my mistake?</p>
  
  <p>Thank you.</p>