How to get parameters from view to controller in Ionic
<p>here is my view</p>

<pre><code>&lt;ion-view view-title="Playlists"&gt;
  &lt;ion-content&gt;
    &lt;ion-list&gt;
      &lt;ion-item ng-repeat="playlist in playlists" href="#/app/playlists/{{playlist.id}}"&gt;
        {{playlist.title}}
      &lt;/ion-item&gt;
    &lt;/ion-list&gt;
  &lt;/ion-content&gt;
&lt;/ion-view&gt;
</code></pre>

<p>Here is my state templating</p>

<pre><code>  .state('app.single', {
    url: '/playlists/:playlistId',
    views: {
      'menuContent': {
        templateUrl: 'templates/playlist.html',
        controller: 'PlaylistCtrl'
      }
    }
  });
</code></pre>

<p>and here is my controller</p>

<pre><code>.controller('PlaylistCtrl', function($scope, $stateParams) {

});
</code></pre>

<p>how to get the parameters from the view in the controller?</p>