IONIC_DIRECTIVES

Improve this doc

The core Ionic directives as well as Angular's CORE_DIRECTIVES and FORM_DIRECTIVES are avaialbe automatically when you bootstrap your app with the @App decorator. This means if you are using custom components you no longer need to import IONIC_DIRECTIVES as they are part of the @Apps default directives.

If you would like to not have them included by default, you would need to bootstrap the app differently.

Instead of starting your app like so:

@App({
 template: "<ion-nav></ion-nav>"
})

export class MyApp{

}

We would use Angulars default way of bootstrap an app, import IONIC_DIRECTIVES and ionicProviders, then declare ionicProviders as a dependencey.

import {IONIC_DIRECTIVES, ionicProviders} from 'ionic-angular';
import {bootstrap} from 'angular2/platform/browser';

@Component({
    //default selector, and theme.
    directives: [IONIC_DIRECTIVES]
})
class App {}

bootstrap(App,ionicProviders())

Angular

Ionic

API

Native

General