I have a page called entry-main and include this template:
<template> <entry-search></entry-search> <entry-details></entry-details> </template>
Inside <entry-search> there is another user element. It looks like this:
<template> <div class="row"> <div class="col-lg-12"> <div class="input-group"> <span id="entry_search" class="input-group-addon"> <span class="fa fa-search"></span> </span> <typeahead id="choose" placeholder="Holding the place"></typeahead> </div> </div> </div> </template>
Inside the viewahead typeahead, I get the value of my typeahead as follows:
$(this.id).on('typeahead:selected', function (e, item) { this.selected = item; });
Now I have a question, how can I get this.selected from my model type-head-viewmodel in my input-data model-viewmodel?
And just for clarity, there should be something like this:
<entry-main> <entry-search> <typeahead></typeahead> </entry-search> <entry-details> ${selected} </entry-details> </entry-main>
source share