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

Created on 3 Jun 2016  路  6Comments  路  Source: ionic-team/ionic-framework

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

Most helpful comment

@tamerbak

npm install ionic-angular@nightly

All 6 comments

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
) {

@zywh how can I install latest nightly version ?

@tamerbak

npm install ionic-angular@nightly

@manucorporat Thanks!

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danbucholtz picture danbucholtz  路  3Comments

gio82 picture gio82  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

Nick-The-Uncharted picture Nick-The-Uncharted  路  3Comments

brandyscarney picture brandyscarney  路  3Comments