An open API service indexing awesome lists of open source software.

https://github.com/christophhu/ngx-debug-mode

The ngx-debug-mode repostory is a demo application of the ngx-debug-mode library. The library adds a simple toggle-component. So you can switch to hide or show all elements in your application.
https://github.com/christophhu/ngx-debug-mode

angular debug debugmode demo localstorage ngx

Last synced: 4 months ago
JSON representation

The ngx-debug-mode repostory is a demo application of the ngx-debug-mode library. The library adds a simple toggle-component. So you can switch to hide or show all elements in your application.

Awesome Lists containing this project

README

          

# Ngx-Debug-Mode

## Frameworks and Languages


Static Badge

Static Badge

Static Badge

## Demo


image

## Description
This Repository contains a simple Angular library for toggling the debug mode. It is designed to be easy to use and integrate into any Angular application.
It uses the `localStorage`-API to save the user's preference for debug mode, so that the setting persists across page reloads. The library is easy to use and can be installed via [npm](https://www.npmjs.com/package/@christophhu/ngx-debug-mode).

## Installation
```bash
npm i @christophhu/ngx-debug-mode
```

## Use
### With default toggle
```html

```

### With custom toggle
```html

```

```typescript
import { DebugModeService, DebugModeComponent } from "@christophhu/ngx-debug-mode";

@Component({
...
imports: [
DebugModeComponent
],
providers: [
DebugModeService
]
})
export class TestComponent {

constructor(private _debugModeService: DebugModeService) {}

toggleDebug() {
this._debugModeService.toggleDebug()
}
getDebug(): Observable {
return this._debugModeService.debug$
}
}
```