mv-feedbackentes-ionic
v0.0.5
Published
## To build the library and link it locally
Downloads
2
Readme
ionic-feedbackentes
To build the library and link it locally
npm run packagr
cd dist
npm link
This will create a dist
directory which can be linked locally in your project by
npm link mv-ionic-feedbackentes
To build the library and publish it on NPM
WARNING: Don't forget to update the version (in package.json) before publishing it
npm run publishr
This will create a npm package which can be installed in your project by
npm install mv-feedbackentes-ionic --save
Build documentation
npm run compodoc
Serve documentation
npm run compodoc-serve
documentation will be served on http://localhost:8080
TODO: Merge older readme
feedbackentes-ionic
This Ionic project hosts the ionic library for feedbackentes
It can be imported into any ionic project by following this readme.
Install feedbackentes in the app
- [ ] install feedbackentes-common from npm a via a local link
- [ ] add the ./directives folder into the ./src folder of the app
- [ ] feedbackentes-common uses html2canvas that can be added be
npm install --save html2canvas
- [ ] run npm install to check for dependencies (optionnal)
npm install
Import feedbackentes in the app
ionic-feedbackentes uses ionic 3 lazy loading system, where each page has its module. Explanations given may need adaptations to be useful on another ionic app architecture
in app.module.ts
- [ ] import { MvFeedbackentesCommonModule } from 'mv-feedbackentes-common';
- [ ] import { DirectivesModule } from '../directives/directives.module';
set the config, with the project's feedbackentes api key and its client version (in the example, those infos are read from a config file in the app)
- [ ] import { config } from '../assets/config/env';
- [ ] const feedbackentesConfig = { apiKey: config.feedbackentes.apiKey, clientVersion: config.app.version }
add to @NgModule({ imports: [
[ ] MvFeedbackentesCommonModule.forRoot(feedbackentesConfig),
[ ] DirectivesModule
],
entryComponents: [
[ ] FeedbackModalComponent
],
in app.component.ts
Import feedlog service so logs can be intercepted ... ... and launch logs interception before any log is fired by configuring it at the very start of your app initialisation
constructor(
[ ] private feedlogService: FeedlogService
) {
[ ] this.feedlogService.configure();
get a grip on the app so you can use Feedbackentes directive anywhere in your app, even at the root of it (aka app.html)
- [ ] import { NavController } from 'ionic-angular';
export class MyApp {
- [ ] @ViewChild('myNav') navCtrl: NavController;
in EACH_PAGE_YOU_CHOOSED.module.ts
- [ ] import { DirectivesModule } from '../directives/directives.module';
add to @NgModule({ imports: [
[ ] DirectivesModule
],
in EACH_PAGE_YOU_CHOOSED.ts
[ ] import { FeedbackService } from 'mv-feedbackentes-common';
constructor(
[ ] private feedbackService: FeedbackService,
)
in EACH_PAGE_YOU_CHOOSED.html just add the directive in inside any of your html or angular components that you want to make clickabled
mvFeedbackentes
By example :
<button ion-button mvFeedbackentes>
<ion-icon name="bug"></ion-icon>
</button>
or :
<ion-icon name="bug" mvFeedbackentes></ion-icon>