SmartSelect Dynamic creation error

I am trying to create smart select dynamically- but it is redirecting to 404.html page instead. Following are the codes -

app.smartSelect.create({el:’.testsel’,view: app, openIn : ‘popup’});


<li>  <a class="item-link smart-select smart-select-init testsel" data-searchbar="true" data-searchbar-placeholder="Select data" data-open-in="popup" >
    <select name="abc" onchange="somefunction(this.value)">
        <option value="all" selected>All</option>  </select>
    <div class="item-content">
      <div class="item-inner">
        <div class="item-title"><b>Input Data</b></div>

You initialize it twice. Once with smart-select-init class and also with JS api. Use something one

I have removed - ‘smart-select-init’ still it is redirecting to 404.html only.
Basically this HTML code is embedded to the page through ajax call and after that we call javascript to initialize it. Please suggest.

Would be good to see live example or JSFiddle

The issue is resolved by correctly defining the view while creating smart-select. I don’t use fiddle so unable to share complete code. Thanks.

app.smartSelect.create({el:’.testsel’,view: app.views.current, openIn : ‘popup’});