Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49184

Set StateParams in ng-href

$
0
0

@Ionicoser wrote:

Hi all!

Does anybody know how i can send an id over an link?

Template:

<ion-item nav-clear menu-close ng-href="#/app/home/{{profile.id}}" ng-repeat="profile in profiles" class="item">

Config:

.state('app.home', {
  url: '/home/:id',
  cache: false,
  views: {
    'appContent': {
      templateUrl: 'templates/app/home.html',
      controller: 'appHomeCtrl',
    },
  },
})

Controller:

if ($stateParams.id) {
  alert($stateParams.id);
}

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>