0.13.12 • Published 2 years ago

ngx-teleport v0.13.12

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Issues MIT License LinkedIn

<!--This can be anwhere in your App-->
<ngx-teleport to="destination"> <stuff>...</stuff></ngx-teleport>

<!--This can be anwhere in your App-->

<ngx-teleport-outlet name="destination"> </ngx-teleport-outlet>

<!--content will be rendered here-->

<stuff>...</stuff>

About The Project

Product Name Screen Shot

There are many situations where we would want to break the unidirectional top-down rendering of template/components and render DOM outside of a component, anywhere in your app

Here are few use cases:

  • You want to render different template in your toolbar or sidebar based on different routes but you want to bind properties and events in the child component
  • You want to conditionally show some template in different corners of your application which may not be hierarchically related

Use the NgxTeleport to get started.

Installation

npm install ngx-teleport

or using yarn

yarn add ngx-teleport

Usage Example

<!--This can be anwhere in your App-->
<ngx-teleport to="destination"> <stuff>...</stuff></ngx-teleport>

<!--This can be anwhere in your App-->
<ngx-teleport-outlet name="destination"> </ngx-teleport-outlet>
<!--content will be rendered here-->
<stuff>...</stuff>
  • Just Import NgxTeleportModule in the NgModule of which ever components you are using ngx-teleport and ngx-teleport-outlet in
import { NgxTeleportModule } from 'ngx-teleport';

@NgModule({
  //...
  imports: [
    //..
    NgxTeleportModule,
    //..
  ],
})
export class SomeModule {}

For more examples, please refer to the Documentation

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.md for more information.

Contact

Nivrith - @_Nivrith_ - nivrithgomatam@gmail.com

Project Link: https://github.com/nivrith/ngx-teleport

0.13.12

2 years ago

0.13.11

2 years ago

0.13.10

2 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago