0
I created a screen with several buttons very similar to this :
https://plus.google.com/+JoshuaMorony/posts/Rjhs4RCwek3
When I click on a button it would have an id and this id I get on its route, I did with list already, but several buttons passing parameter still could not.
My question is how to pass this button id to another screen.
Warnings.html
<ion-view view-title="Avisos">
<ion-content style="background-color: #FF4500; background-size: cover;
background-position: center;">
<div class="row icon-row">
<div class="col text-center">
<button class="botao button button-positive" id="1">Icon</button>
<br>mais informaçoes
</div>
<div class="col text-center">
<button class="botao button button-positive" id="2">Icon</button>
<br>Avisos
</div>
<div class="col text-center ">
<button class="botao button button-positive" id="3">Icon</button>
<br>Contato
</div>
</div>
</ion-content>
</ion-view>
That part is where I get the id, How can I get the id of the chosen button ? and pass it on side.id ?
html site.
<ion-view view-title="Site">
<ion-content>
<ion-list>
<ion-item ng-repeat="site in sites" href="#/app/conteudoDoSite/{{site.id}}">
<span ng-bind-html="site.title"></span><span class="badge badge-assertive">{{site.post_count}}</span>
</ion-item>
</ion-list>
</ion-content>
</ion-view>
how to pass parameter to another screen with ionic1 and angular1 ? Could anyone help me? what I am trying to do is that when the user clicks one of these buttons is passed the id.
thanks a lot for the tip I managed to do like this : <ion-item class="col text-center"> <img class="boot" src="img/picture.png" ui-sref="app.contentDoSite({siteid: 8})"></img> <br>Gallery <br> </ion-item> my Routes.js : . state('app.contentDoSite', { url: '/contentDoSite/:siteid', views: { 'menuContent': { templateUrl: 'templates/contentDoSite.html', controller: 'contentController' } }&#; })
– Lucas Santos
I put the id straight running this way, I thought I’d do as Oce suggested, but I didn’t know how I could do it. Thanks so much for the tips. @Gabriellovetro
– Lucas Santos