@smth wrote:
Hi
I'm just using ionic / angular for the first time. I've started out with the "sidemenu" app and I'm trying to pass some variables from the various states to a template. So far, in app.js I've got:
.state('app.example', { url: '/example', views: { 'menuContent': { templateUrl: 'templates/example.html', data: { customData1: "var one", customData2: "var two" } } } })
and in
templates/example.html
I've got<ion-view view-title="Example"> <ion-content> <h1>Example</h1> {{$state.current.data.customData1}} </ion-content> </ion-view>
but that appears to be undefined. Any pointers?
Posts: 1
Participants: 1