This project was generated with Angular CLI version 9.0.1.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
Develop your module like any other Angular module. Then, run npm run build -- --prod
to build a local copy.
When you're ready to publish to npm, cd to dist
folder then run npm publish
.
To use it in another project while developing use https://github.com/marcj/npm-local-development#readme Prepare .links.json in root project app and then:
cd myproject
npm-local-development ./
Currently, modules must be published to npm. npm link
packages will not install properly with our webpack confing (something on our list). If you can't push private code to npm, other options are a private npm repo/npm enterprise, or npm install
from a git repo.
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
// Import your module
import { MyModule } from 'ionic-module-template';
@NgModule({
declarations: [
MyApp,
HomePage
],
imports: [
IonicModule.forRoot(MyApp),
MyModule // Put your module here
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage
],
providers: []
})
export class AppModule {}