javascript - View / State with IONIC -
so i'm using ionic angularjs , i'm having issue on .states :
app.config(function($stateprovider, $urlrouterprovider) { $stateprovider.state('app', { url : '', templateurl: 'main.html', abstract: true, }) $stateprovider.state('app.recherche', { url: '/recherche', views: { vrecherche: { templateurl: 'recherche.html', controller: 'myctrl' } }, }) $stateprovider.state('app.recherche.index', { abstract: true, url: '/', template : '<ion-nav-view></ion-nav-view>', }) $stateprovider.state('app.recherche.magasin', { url: '/magasin', //:dataid, controller: 'datactrl', templateurl: "magasin.html", }) $stateprovider.state('app.reunion', { url: '/reunion', views: { vreunion: { templateurl: 'reunion.html', controller: 'myctrl' } }, }) $urlrouterprovider.otherwise('/recherche'); })
and can't page reload, got url changed... it's not swaping of view ...
i'm kinda lost
edit :
<!----------------------------------------------------------------------------------------> <!--------------------------------------- home -------------------------------------------> <!----------------------------------------------------------------------------------------> <script type="text/ng-template" id="main.html"> <ion-nav-bar class="bar-positive nav-title-slide-ios7" align-title="center"> <ion-nav-back-button class="button-icon ion-arrow-left-c"></ion-nav-back-button> </ion-nav-bar> <ion-tabs class="tabs-positive"> <ion-tab icon="icon ion-search" ui-sref="app.recherche"> <ion-nav-view name="vrecherche"></ion-nav-view> </ion-tab> <ion-tab icon="icon ion-person-stalker" ui-sref="app.reunion"> <ion-nav-view name="vreunion"></ion-nav-view> </ion-tab> </ion-tabs> </script> <!----------------------------------------------------------------------------------------> <!------------------------------------- recherche ----------------------------------------> <!----------------------------------------------------------------------------------------> <script id="recherche.html" type="text/ng-template"> <ion-view title="recherche" hide-back-button="true"> <ion-content class="padding"> <div class="item item-divider" > département : </div> <div class="item item-input-inset"> <label class="item-input-wrapper"> <i class="icon ion-search placeholder-icon"></i> <input ng-model="search" type="text" placeholder="recherche"> </label> <button class="button button-small" ng-click="look(search)"> submit </button> </div> <button class="btn btn-danger navbar-btn" ui-sref="app.recherche.magasin" >button submit</button> </ion-content> </ion-view> </script> <!----------------------------------------------------------------------------------------> <!-------------------------------------- magasins ----------------------------------------> <!----------------------------------------------------------------------------------------> <script id="magasin.html" type="text/ng-template"> <ion-view title="recherche : {{data.name}}"> <ion-content class="padding"> <div class="row"> <div class="col"> <div id="map"></div> </div> <div class="col"> id : {{data.id}}<br/> nom : {{data.name}} </div> </div> </ion-content> </ion-view> </script> <!----------------------------------------------------------------------------------------> <!------------------------------------ reunion ---------------------------------------> <!----------------------------------------------------------------------------------------> <script id="reunion.html" type="text/ng-template"> <ion-view title="réunions"> </ion-view> </script>
i looking info via : http://codepen.io/lizz/pen/bnkney
and tryed things didn't helped me @ all
i'd have app have 2 tabs displayed. app.recherche , app.reunion
and i'd have app.recherche clickable list ( here 1 button ) get's me sliding page informations app.recherche.magasin
Comments
Post a Comment