Develop your module like any other Angular 2 module. Then, run npm run build
to build a local copy.
When you're ready to publish to npm, run npm publishPackage
.
If you'd like to test this package, run npm install <name>
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
// Importe o módulo
import { FoitopCardsModule } from 'foitop-cards';
@NgModule({
declarations: [
MyApp,
HomePage
],
imports: [
IonicModule.forRoot(MyApp),
FoitopCardsModule // Coloque o módulo aqui
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage
],
providers: []
})
export class AppModule {}