Don't get information in new page ( ionic + angularjs ) -


i'm trying send parameters page instruction ( ui- sref = " forgotpassword ( {id : item.id } ) " ) in new page don´t parameters sent

and why thes tabs not displaying in tne new page ?

any please

code:

   .state("app",{       templateurl: "templates/app.html",       url: "/app",       abstract: true     })     .state('forgotpassword', {     url: "/forgot-password/:id",     templateurl: "templates/forgot-password.html",     controller: "forgotpasswordctrl" })  .controller('forgotpasswordctrl', function($scope, $stateparams, rawdata) {     $scope.rawdata = rawdata.get($stateparams.id); })  .factory('rawdata', function() {     // might use resource here returns json array      // fake testing data        var rawdata = [{       "id": "1",       "tipo": "evento",       "titulo": "esta es una noticia de dos líneas principal",       "bg": "fondo-not.png",       "bgdetail": "noti-detalle.png",       "fec": "abril, 14,  2:56 am",       "com": "backpack très bien. made in collaboration haerfest. nylon body top zip closure. leather bottom. outer compartment zip closure , leather trims. adjustable shoulder straps in leather. metal hardware. lined cotton. inner compartments. outer logo branding."     }];      return {         all: function() {             return rawdata;         },         get: function(id) {             (var = 0; < rawdata.length; i++) {                 if (rawdata[i].id === parseint(id)) {                     return rawdata[i];                 }             }             return null;         }     }; }); 

ion-item :

<ion-view title="noticias">     <ion-content ng-controller="noticiasctrl" style="top:0">                     <ion-list>             <ion-item ng-repeat="item in rawdata.slice(1, n)" class="item-noticias overlay" ng-style="{'background':'url(img/'+item.bg +') no-repeat center', 'background-size':'cover'}">                                 <div class="overlay" ui-sref="forgotpassword({ id: item.id })">                            <span class="tipo">{{ item.tipo }}</span>                     <span class="titulo">{{ item.titulo }}</span>                     <span class="link">leer mas <img src="img/right-arrow.png"></span>                                     </div>                                     </ion-item>           </ion-list>                </ion-content> </ion-view> 

new page:

<ion-view title="forgotpassword">   <ion-nav-buttons side="left">     <button class="button" ng-click="$ionicgoback($event)"></button>   </ion-nav-buttons>   <ion-content style="top:0">         <div class="header-image" ng-style="{'background':'url(img/'+bgd +') no-repeat center', 'background-size':'cover'}">     <div class="overlayprind">        <div class="overlayprinsecd">                              <span class="tipo">{{ tipo }}</span>             <span class="titulo">{{ tit }}</span>                                      </div>                     </div>          </div>   <p class="fec">{{ fec }}</p>   <p class="texto">{{ com }}</p>   </ion-content> </ion-view> 

tabs:

app.html:

<ion-tabs class="tabs-positive tabs-icon-only tabs-color">      <ion-tab title="noticias" icon-off="noticia" icon-on="noticia2" ui-sref="app.noticias">          <ion-nav-view name="app-noticias">          </ion-nav-view>      </ion-tab>      <ion-tab title="servicios" icon-off="serv" icon-on="serv2" ui-sref="app.servicios">          <ion-nav-view name="app-servicios">          </ion-nav-view>      </ion-tab>      <ion-tab title="información" icon-off="infor" icon-on="infor">          <ion-nav-view>          </ion-nav-view>      </ion-tab>      <ion-tab title="reserva" icon-off="reser" icon-on="reser">          <ion-nav-view>          </ion-nav-view>      </ion-tab>      <ion-tab title="contacto" icon-off="cont" icon-on="cont">          <ion-nav-view>          </ion-nav-view>      </ion-tab>  </ion-tabs> 

it seems wanted show direct view inside nav-view. state shouldn't using views then.

code

.state('forgotpassword', {     url: "/forgot-password/:id",     templateurl: "templates/forgot-password.html",     controller: "forgotpasswordctrl" }) 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -