This library was generated with Angular CLI version 16.2.0.
Run ng generate component component-name --project lib-presciption
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project lib-presciption
.
Note: Don't forget to add
--project lib-presciption
or else it will be added to the default project in yourangular.json
file.
Run ng build lib-presciption
to build the project. The build artifacts will be stored in the dist/
directory.
After building your library with ng build lib-presciption
, go to the dist folder cd dist/lib-presciption
and run npm publish
.
Run ng test lib-presciption
to execute the unit tests via Karma.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
To install the Presciption Library, run the following command:
npm install git+https://github.com/Intelehealth/intelehealth-doctor-webapp-download-prescription#build_0.1
Note: The --force flag is used to override any dependency conflicts. Use it cautiously to avoid breaking changes in your project.
#build_0.1 refers the git branch where build files are placed
Once the package is installed, you can import the LibPresciptionModule
in your Angular application.
In your Angular module (e.g., app.module.ts
), import the LibPresciptionModule
:
import { LibPresciptionModule } from 'lib-presciption';
@NgModule({
declarations: [AppComponent],
imports: [ LibPresciptionModule.forRoot(environment),],
bootstrap: [AppComponent]
})
export class AppModule {}
To use the presciption component, add the selector to your template file:
<lib-presciption></lib-presciption>
To use the env file from the application to the plugin
In your Angular module (e.g., app.module.ts
)
import { LibPresciptionModule } from 'lib-presciption';
import { environment } from "../environments/environment";
@NgModule({
declarations: [AppComponent],
imports: [ LibPresciptionModule.forRoot(environment),],
providers: [{ provide: 'environment', useValue: environment }],
bootstrap: [AppComponent]
})
export class AppModule {}