Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hendrickson-tyler/nativescript-hide-action-bar
NativeScript Angular plugin for easily hiding the ActionBar
https://github.com/hendrickson-tyler/nativescript-hide-action-bar
angular nativescript nativescript-plugin
Last synced: 3 months ago
JSON representation
NativeScript Angular plugin for easily hiding the ActionBar
- Host: GitHub
- URL: https://github.com/hendrickson-tyler/nativescript-hide-action-bar
- Owner: hendrickson-tyler
- License: mit
- Created: 2021-03-21T02:39:44.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-17T03:31:30.000Z (over 2 years ago)
- Last Synced: 2023-03-06T00:54:56.827Z (almost 2 years ago)
- Topics: angular, nativescript, nativescript-plugin
- Language: TypeScript
- Homepage:
- Size: 2.16 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# NativeScript Hide Action Bar
> **Warning**
> This plugin is deprecated and will not be updated. You probably shouldn't use it anymore.
>
> This simple directive was really only useful for the old NativeScript Angular code sharing method. Code sharing options have [changed drastically](https://docs.nativescript.org/code-sharing/index.html#code-sharing), so this plugin doesn't have much of a purpose beyond legacy code.## Description
This is a simple plugin for the Angular flavor of NativeScript. With it, you can hide the `ActionBar` of any view by adding the directive to an element anywhere in the component.
This is especially useful for NativeScript [code sharing](https://docs.nativescript.org/angular/code-sharing/intro#introduction) projects as trying to access the `Page` object in a component would break your web build.
## Installation
From the root folder of your project, execute the following command:
```javascript
ns plugin add nativescript-hide-action-bar
```## Usage
Once the plugin is added to your project, you need to add the `HideActionBarModule` to your imports array in your desired feature module or the `SharedModule`:
```javascript
import { HideActionBarModule } from 'nativescript-hide-action-bar';@NgModule({
// ...
imports: [
HideActionBarModule,
// ...
],
// ...
})
export class SharedModule { }
```> **NOTE: Simply importing the `HideActionBarModule` into your `AppModule` will not work.**
Afterwards, simply add the directive to any element as follows:
```html
```
You'll want to make sure that the element is actually present on the page. For example, an element nested within an `*ngIf` that evaluates to false will not cause the ActionBar to be hidden.