ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Upgrade to Nightly build 2.0.0-beta.7-201606021731- app.ts @App not callable

Open zywh opened this issue 10 years ago • 6 comments

Typescript error

[ts] Value of type 'typeof App' is not callable. Did you mean to include 'new'? import App

The template is from conference app

zywh avatar Jun 03 '16 14:06 zywh

Hello @zywh ! We have removed @App in favor of using @Component now. Here are a list of instructions for how to update right now, once beta.8 is released (which should be very soon) these will be posted with the changelog (: Thanks for using Ionic!

Replace all instances of @Page with @Component:

import {Page} from 'ionic-angular';

@Page({

})

becomes

import {Component} from '@angular/core';

@Component({

})

Replace @App with @Component and then bootstrap it. Move any config properties into the bootstrap:

import {App, Platform} from 'ionic-angular';

@App({
  templateUrl: 'build/app.html',
  providers: [ConferenceData, UserData],
  config: {
    tabbarPlacement: 'bottom'
}
export class MyApp {

}

becomes

import {Component} from '@angular/core';
import {ionicBootstrap, Platform} from 'ionic-angular';

@Component({
  templateUrl: 'build/app.html',
})
export class MyApp {

}

ionicBootstrap(ConferenceApp, [ConferenceData, UserData], {
  tabbarPlacement: 'bottom'
});

Rename any uses of IonicApp to App:

import {IonicApp} from 'ionic-angular';

constructor(
  private app: IonicApp
) {

becomes

import {App} from 'ionic-angular';

constructor(
  private app: App
) {

jgw96 avatar Jun 03 '16 15:06 jgw96

@zywh how can I install latest nightly version ?

tamerbak avatar Jun 04 '16 19:06 tamerbak

@tamerbak

npm install ionic-angular@nightly

manucorporat avatar Jun 04 '16 20:06 manucorporat

@manucorporat Thanks!

tamerbak avatar Jun 04 '16 21:06 tamerbak

Hello :) Is there a way to check what's in the nightly build?

I tried to compare the generated version to the commits' dates, but I don't think that's very accurate... (or is it?)

3.6.1-201709131804

rafbgarcia avatar Sep 15 '17 15:09 rafbgarcia

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 02 '18 02:09 ionitron-bot[bot]