Simple Hello World Package
Simple Hello World Package across different front-end technologies which displays text it is passed on.
Usage in React
import HelloWorld from '@manojdev/test-hello-world/react-component'; function App() { return ( ); }
Usage in Angular
Import Module & register the module
import { HelloWorldAngularLibraryModule } from @manojdev/test-hello-world/angular-library'; @NgModule({ … imports: [ HelloWorldAngularLibraryModule, … ], … }) export class AppModule { }
Define the text & add it to html template
Define the text in app.component.ts & use ‘hello-world’ selector to add hello world in app.component.html
//app.component.ts import { NgModule } from '@angular/core'; … export class AppComponent { … text = "Hello World from Angular Library"; … } //app.component.html <div> <hello-world [text]="text"></hello-world> </div>