JKnorr91 / ion-slide-box-tabs

An Add-On directive for the ion-slide-box, that adds tabs to the slide box, known from the Android Material Design specification
MIT License
248 stars 110 forks source link

Question: Controller Content within Tab? #16

Open fromdecember opened 8 years ago

fromdecember commented 8 years ago

I've been trying to place a controller (say one that's grabbing data from a json url) within a tab, but can't seem to get anything working. Any ideas?

ghost commented 8 years ago

Like this? Place ng-controller in the corresponding div.

<ion-content scroll="false">
    <ion-slide-box show-pager="false" ion-slide-tabs>
        <ion-slide ion-slide-tab-label="test">
              <div ng-controller="YourController1"><h1>Tab 1</h1></div></ion-slide>
        <ion-slide ion-slide-tab-label="secondTest">
              <div ng-controller="YourController2"><h1>Tab 2</h1></div></ion-slide>
</ion-content>
fromdecember commented 8 years ago

Yes. Once I add the controller in a slide-box everything disappears for that tab like it doesn't exist.