JSPM

ng-string-rotate

1.2.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 4
    • Score
      100M100P100Q32370F

    Package Exports

    • ng-string-rotate

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ng-string-rotate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    String rotater

    String rotater for Angular; Rotate the string in clockwise

    • john -> ohnj
    • john -> hnjo

    Installation

    npm install --save ng-string-rotate

    Usage

    Import StringRotateModule

    You need to import the StringRotateModule in the module of your app where you want to use it.

    import { BrowserModule } from '@angular/platform-browser';
    import { NgModule } from '@angular/core';
    
    import { AppComponent } from './app.component';
    import { StringRotateModule } from 'ng-string-rotate';
    
    @NgModule({
      declarations: [
        AppComponent
      ],
      imports: [
        BrowserModule,
        StringRotateModule
      ],
      providers: [],
      bootstrap: [AppComponent]
    })
    export class AppModule { }

    Use the ng-string-rotate selector

    Place the ng-string-rotate and pass the string as an input to ngString and also the number of times need to rotate as shifts

    <ng-string-rotate [ngString]="'john'" [shifts]="2"></ng-string-rotate>

    NgStringRotate

    This project was generated with Angular CLI version 7.1.0.

    Development server

    Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

    Code scaffolding

    Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

    Build

    Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

    Running unit tests

    Run ng test to execute the unit tests via Karma.

    Running end-to-end tests

    Run ng e2e to execute the end-to-end tests via Protractor.

    Further help

    To get more help on the Angular CLI use ng help or go check out the Angular CLI README.