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

7th
Oct 2016
Tanya Gray
@tanyagray
Oct 07 2016 00:52 UTC
Just wrote up how to use Ionic2 with AngularFire2 without hacking your node_modules: https://medium.com/@tanya/ionic2-with-angularfire2-f0b0e2126cc7
Took me a while to figure out so hopefully it helps someone. Starter project on GitHub too.
Stephan Kristyn
@nottinhill
Oct 07 2016 01:50 UTC

Ok one last error I got, then my upgrade is complete
Maybe you guys know...

node_modules/@types/localforage/index.d.ts(25,25): error TS2304: Cannot find name 'Promise'.

mhh does ionic need that module at all...?

I though I read Storage is a wrapper to forage
Stephan Kristyn
@nottinhill
Oct 07 2016 02:02 UTC
Any type definitions for third party libraries that are included via the typings tool and are included in the the typings.json file should be updated to use npm @types.
REALLY?!!!
Swapnil Tripathi
@Anshdesire
Oct 07 2016 09:32 UTC
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { NavController, AlertController, Events, LoadingController} from 'ionic-angular';
import { MyApp } from './app.component';
import { HomePage } from  'xxxxxxx';
import {Component, ViewChild} from '@angular/core';
import {Platform, Alert} from 'ionic-angular';
import {StatusBar, LocalNotifications} from 'ionic-native';
import {LoginPage} from  'xxxxxxx';
import {MenuController} from 'ionic-angular';
// import { disableDeprecatedForms, provideForms } from '@angular/forms';
import {OpaqueToken}   from '@angular/core';
let APP_CONFIG = new OpaqueToken('APP_CONFIG');
import {FeedPage} from  'xxxxxxx';
import {SettingsPage} from  'xxxxxxx';
import {NtkCategoriesPage} from  'xxxxxxx';
import {httpProvider} from  'xxxxxxx';
import {CONFIG} from  'xxxxxxx';
import {LocalStorage} from  'xxxxxxx';
import {Auth} from  'xxxxxxx';
import {JwtHelper} from 'angular2-jwt';
import {ComicListingPage} from  'xxxxxxx';
import {AchievementsPage} from  'xxxxxxx';
import {Observable} from 'rxjs/Observable';
import { Splashscreen } from 'ionic-native';
import {StayOnTrackPage} from  'xxxxxxx';
import {MedicationReminderPage} from   'xxxxxxx';
import {MedicineNotification} from  'xxxxxxx';

import {AddNewLabPage} from  'xxxxxxx';
import {ComicDetailsPage} from  'xxxxxxx';
import {EditUserPage} from  'xxxxxxx';
import {ForgotPasswordPage} from  'xxxxxxx';
import {LabResultsPage} from  'xxxxxxx';
import {MedicationPage} from  'xxxxxxx';
import {MedicineLoggingPage} from  'xxxxxxx';
import {Nav} from  'xxxxxxx';
import {NtkDetailsPage} from  'xxxxxxx';
import {NtkListingPage} from  'xxxxxxx';
import {SetMedicationReminderPage} from  'xxxxxxx';
import {SignupPage} from  'xxxxxxx';
import {TermsPage} from 'xxxxxxx';

import {appointmentState, stayOnTrackClass, limitLengthPipe} from '../pipes/lengthLimit';

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    LoginPage,
    FeedPage,
    SettingsPage,
    NtkCategoriesPage,
    ComicListingPage,
    AchievementsPage,
    StayOnTrackPage,
    MedicationReminderPage,
    AddNewLabPage, ComicDetailsPage, EditUserPage, ForgotPasswordPage, LabResultsPage, MedicationPage, MedicineLoggingPage, Nav, NtkDetailsPage, NtkListingPage,
    SetMedicationReminderPage, SignupPage, TermsPage,
    limitLengthPipe,
    stayOnTrackClass,
    appointmentState,
  ],
  imports: [
    IonicModule.forRoot(MyApp)
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    LoginPage,
    FeedPage, SignupPage, TermsPage, ForgotPasswordPage, SettingsPage, NtkCategoriesPage,
    ComicListingPage,
    AchievementsPage,
    StayOnTrackPage,
    MedicationReminderPage,
    AddNewLabPage, ComicDetailsPage, EditUserPage , LabResultsPage, MedicationPage, MedicineLoggingPage, NtkDetailsPage, NtkListingPage,
    SetMedicationReminderPage
  ],
  providers: [
    , httpProvider
    , JwtHelper
    ,{provide: APP_CONFIG, useValue: CONFIG }

    , LocalStorage
  , Auth
  , MedicineNotification]
})
export class AppModule {}
when i run ionic serve it works on browser but ... WHen i emulate it
it fails
gc: Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol NtkDetailsPage
and file in which it give error
contains this code
import { Component, Inject, OpaqueToken} from '@angular/core';
let APP_CONFIG = new OpaqueToken('APP_CONFIG');
import {CONFIG} from '../../config/app-config';
import { NavController, NavParams, LoadingController } from 'ionic-angular';
import {Nav} from '../navigation/nav';
import {httpProvider} from '../../providers/http/httpProvider';
import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';

/*
  Generated class for the NtkDetailsPage page.

  See http://ionicframework.com/docs/v2/components/#navigation for more info on
  Ionic pages and navigation.
*/
@Component({
  templateUrl: xxxx,  providers: [{provide: APP_CONFIG, useValue: CONFIG }]
})
export class NtkDetailsPage {
  title: string;
  ntkItem;
  isLink;
  isVideo;
  url: SafeResourceUrl;
  constructor(private sanitizer: DomSanitizer, private nav: NavController, private navParams: NavParams, private http_service: httpProvider, @Inject(APP_CONFIG) private config, private loader: LoadingController) {
    this.title = 'xxxx';
    this.ntkItem = this.navParams.get('ntkData');
    this.isVideo = this.isLink = false;
    this.checkContentType();
    if(!this.ntkItem.seen){
      this.updateContentSeen();
    }

  }
can any one suggest the issue
Myck
@mickadoua
Oct 07 2016 19:25 UTC
hi all
Swapnil Tripathi
@Anshdesire
Oct 07 2016 19:26 UTC
Hi
Myck
@mickadoua
Oct 07 2016 19:26 UTC
i update on ionic2 RC0, and i would like debug my app,
how can i disable Minify when i run on my phone (android)
Swapnil Tripathi
@Anshdesire
Oct 07 2016 19:26 UTC
I have posted a big query
@mickadoua if u cud help me
Myck
@mickadoua
Oct 07 2016 19:27 UTC
okay, i will try to understand but ...
Swapnil Tripathi
@Anshdesire
Oct 07 2016 19:29 UTC
?
Myck
@mickadoua
Oct 07 2016 19:30 UTC
hmm sorry, i have no idea !
Swapnil Tripathi
@Anshdesire
Oct 07 2016 19:31 UTC
r u using 2.0 ?
Myck
@mickadoua
Oct 07 2016 19:32 UTC
yes, since today
Swapnil Tripathi
@Anshdesire
Oct 07 2016 19:39 UTC
Used provider ??
Using opaqueToken
Tim Leguijt
@tleguijt
Oct 07 2016 21:19 UTC
from the Ionic changelog (upgrade to RC0 guide) "Change any uses of the private TypeScript keyword to public"
is it me or is this kinda odd?
some things are private for a good reason
Stephan Kristyn
@nottinhill
Oct 07 2016 21:55 UTC
no
that I understand
You have Ahead of Time Compilation
Template counts as extra class
Template must access public var
TSLint Throws errors if you leave as private
thus must name public
But I have a Question
```imports: [
    IonicModule.forRoot(MyApp, {}),
     TranslateModule.forRoot({
         provide: TranslateLoader,
         useFactory: (http: Http) => new TranslateStaticLoader(http, "../../www/assets/i18n", ".json"),
         deps: [Http]
     }), ```
does not work anymore
useFactory: (http) => {
                return new AuthHttp(
                    new AuthConfig(),
                    http
                );
            },
            deps: [Http]
also does not work with RC0
Compiler says: ngc: Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 101:25 in the original .ts file), resolving symbol AppModule in /Users/tyrion/devel/saveup-front/.tmp/app/app.module.ts
Help would be appreciated
Stephan Kristyn
@nottinhill
Oct 07 2016 22:00 UTC
This is my whole file and I have no idea how to upgrade to RC0: https://gist.github.com/nottinhill/db2fd7c1b04af35b3d774591badf373f