title: AMP amp-autocomplete - go to url when clicked
body: <p>I am trying to get the amp-autocomplete to go directly to a url that it gets from the json list when clicked on. The href is included in the result but when clicking on the result it just adds it to the input box and doesn't direct.</p>
  <p>I tried <code>on=&quot;tap:AMP.navigateTo(url='{{url}}')&quot;</code> which didn't seem to do anything. Not sure if it is possible to do this with amp?</p>
  <pre><code>&lt;form class=&quot;sample-form&quot; method=&quot;post&quot; target=&quot;_top&quot; action-xhr=&quot;https://amp.dev/documentation/examples/api/echo&quot;&gt;
    &lt;label&gt;
      &lt;span&gt;Search for&lt;/span&gt;
      &lt;amp-autocomplete filter=&quot;token-prefix&quot; filter-value=&quot;h1&quot;  min-characters=&quot;2&quot;&gt;
          &lt;input type=&quot;search&quot; name=&quot;h1&quot;&gt;
        &lt;script type=&quot;application/json&quot;&gt;
              {
                  &quot;items&quot;:[
                          {
                              &quot;h1&quot;:&quot;page1&quot;,
                              &quot;url&quot;:&quot;page-1-url&quot;
                          },{
                              &quot;h1&quot;:&quot;page2&quot;,
                              &quot;url&quot;:&quot;page-2-url&quot;
                          },
                          {
                              &quot;h1&quot;:&quot;page3&quot;,
                              &quot;url&quot;:&quot;page-3-url&quot;
                          }
                  ]
              }
        &lt;/script&gt;
              &lt;template type=&quot;amp-mustache&quot; id=&quot;amp-template-custom&quot;&gt;
                  &lt;div class=&quot;slug-item&quot; data-value=&quot;{{h1}}&quot;&gt;
                          &lt;a href=&quot;{{url}}&quot; on=&quot;tap:AMP.navigateTo(url='{{url}}')&quot;&gt;{{h1}}&lt;/a&gt;   
                  &lt;/div&gt;
              &lt;/template&gt;
      &lt;/amp-autocomplete&gt;
    &lt;/label&gt;
  &lt;/form&gt;
  </code></pre>