Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

http-status-pipe

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-status-pipe

[![Build Status](https://travis-ci.org/johnfedoruk/http-status-pipe.svg?branch=master)](https://travis-ci.org/johnfedoruk/http-status-pipe)

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

HttpStatusPipe

Build Status


Angular 5

This package will not work with earlier versions of Angular!


This project contains an Angular 5 pipe that can be used for rendering an arbitrary status code's status text or status type. The pipe, HttpStatusPipe, is exported from the HttpStatusModule.

Demo

NPM

npm install --save http-status-pipe

Usage

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpStatusModule } from 'http-status-pipe';

import { AppComponent } from './app.component';


@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        HttpStatusModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

./src/app/app/module.ts

import { Component } from '@angular/core';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
})
export class AppComponent {
    public statusCode: number = 200;
    constructor() {}
}

src/app/app.component.ts

<h1 id="status-code">
    Error {{ statusCode }}
    <small>
        {{ statusCode | status }}
    </small>
</h1>
<p>{{ statusCode | status:"type" }}</p>

src/app/app.component.html

FAQs

Package last updated on 31 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc