These are chat archives for angular/angular-2-ionic-2

16th
Nov 2016
Kim Biesbjerg
@biesbjerg
Nov 16 2016 00:28
Anyone know what the current status is of running app on device/ios emulator with live reload?
Seems something isn't quite right
Kim Biesbjerg
@biesbjerg
Nov 16 2016 00:45
Nevermind, found a ticket: driftyco/ionic-cli#1425
ikhsanputra07
@ikhsanputra07
Nov 16 2016 04:40
does anyone know about store data to cookie in ionic 2??? in ionic version 1 use $cookies.
ikhsanputra07
@ikhsanputra07
Nov 16 2016 07:31
on angular 2 have plugin angular2-cookie and ng2-cookies. can this plugin used in ionic 2??
thanks
Thierry
@devbieres
Nov 16 2016 08:43
Hi
Sergej Klementinovski
@DarthIwan
Nov 16 2016 09:08

Hi all,

I have a question regarding angular animation. Is it possible to animate one by one element of the list?

Erdem
@erdemildiz_twitter
Nov 16 2016 09:45
hello everyone
I am getting errors from [ngModelOptions]="{standalone: true}"
how can I fix ?
Alexander Kalinovski
@akalinovski
Nov 16 2016 13:33
Hi!
Is it possible ot use Angular Router anyhow? Even with custom code?
I added touter-outlet etc. But it looks that the app has double instances of services etc.
Because one is added by router and one is by IonicApp
Or maybe Ionic already support URls navigation anyhow?
So we don’t need to use Angular Router for getting working it properly inside of the browser
with all features like links, hyperlinks, bookmarks etc
But much better to use router itself for getting all these nice Router features
Francisco Sales
@franciscofsales
Nov 16 2016 14:44
hey guys, I having trouble with ion-tabs
import {Page, NavParams} from 'ionic-angular';
import {RecentPage} from '../recent/recent';
import {FavoritesPage} from '../favorites/favorites';
import {ContactsPage} from '../contacts/contacts';
import {InfoPage} from '../info/info';


@Page({
  templateUrl: 'build/pages/tabs/tabs.html'
})
export class TabsPage {
  static get parameters() {
    return [[NavParams]];
  }

  constructor(navParams, nav) {
    this.mySelectedIndex = navParams.data.tabIndex || 3;

    // set the root pages for each tab
    this.tab1Root = RecentPage;
    this.tab2Root = FavoritesPage;
    this.tab3Root = ContactsPage;
    this.tab4Root = InfoPage;
  }

  selectFavorites(){

  }

}
<ion-tabs [selectedIndex]="mySelectedIndex">
  <ion-tab [root]="tab3Root" tabTitle="Contacts" tabIcon="contacts"></ion-tab>
  <ion-tab [root]="tab1Root" tabTitle="Recent" tabIcon="time"></ion-tab>
  <ion-tab [root]="tab2Root" tabTitle="Favorite" tabIcon="star" (select)="selectFavorites()"></ion-tab>
  <ion-tab [root]="tab4Root" tabTitle="My Info" tabIcon="person"></ion-tab>
</ion-tabs>
doesnt render the tab selector, only the contents.. any idea? thanks
Merel Staal
@Merel1988_twitter
Nov 16 2016 14:50
@franciscofsales do you bind your tab selector to the root?
Francisco Sales
@franciscofsales
Nov 16 2016 14:53
@Merel1988_twitter thanks, i dont think so :S also not sure how to do it.. I know it might be basic, I’m very new :)
Merel Staal
@Merel1988_twitter
Nov 16 2016 14:55
@Component({
  template: `<ion-nav [root]="rootPage"></ion-nav>`
})

export class MyApp {
  public rootPage: any;

  constructor(private userService: UserService, storage: Storage){
    storage.get('token').then((token)=>{
      if(token == null){
        this.rootPage = LoginPage;
      }
      else{
        this.rootPage = TabsPage;
        this.userService.checkToken();
      }
    });
  }
}
Francisco Sales
@franciscofsales
Nov 16 2016 15:02
im doign it like this:
@App({
  templateUrl: 'build/app.html',
  providers: [UserData, ContactData, AzureLogin],
  config: {
    tabbarPlacement: "bottom",
    tabsHideOnSubPages: false
  },
  queries: {
    nav: new ViewChild('content')
  }
})
<ion-nav [root]="root" #content swipeBackEnabled="false"></ion-nav>
then i set the root to an intro view
for login
then i push the tabs page
and i see the tab content but not the selector
Merel Staal
@Merel1988_twitter
Nov 16 2016 15:07
so you push tabs on top of login?
Francisco Sales
@franciscofsales
Nov 16 2016 15:07
yes
is that wrong?
should i replace
Merel Staal
@Merel1988_twitter
Nov 16 2016 15:07
maybe you can try to replace login with tabs
so set root to tabs
so after login do something like [root]="TabsPage"
Francisco Sales
@franciscofsales
Nov 16 2016 15:09
same problem :S
i get something like this:
content is fine but the tab selection is not rendered
Merel Staal
@Merel1988_twitter
Nov 16 2016 15:20
strange
I don't know then
Francisco Sales
@franciscofsales
Nov 16 2016 15:21
i tried changing the selected tab manually and it works
it just doesnt render the bar
Merel Staal
@Merel1988_twitter
Nov 16 2016 15:21
maybe it has something to do with the new viewchild? that is pushing the content on top of it?
Nick
@ncapito
Nov 16 2016 15:22
@johndiego i was asking because i was going to try and reproduce the problem so i can help out.
Francisco Sales
@franciscofsales
Nov 16 2016 15:23
@Merel1988_twitter thanks anyway :)
Jake Niemiec
@jakeNiemiec
Nov 16 2016 15:55
Is it better for app performance (esp. on a mobile device) to:
  1. pass an observable to angular2 directives and subscribe from withen the directive component
    or
  2. subscribe in the parent and pass the resulting data of observable to angular2 directives
Andrew Graham-Yooll
@andrewgy8
Nov 16 2016 16:50
@iRoachie I fixed the issue here.
Kyle Roach
@iRoachie
Nov 16 2016 17:23
@andrewgy8 That’s not exactly the issue I had, it complained something about rollup but i’ll check it over again
Andrew Graham-Yooll
@andrewgy8
Nov 16 2016 18:51
@iRoachie Whats the exact issue?