How to use the ngx-webstorage.NgxWebstorageModule.forRoot function in ngx-webstorage

To help you get started, we’ve selected a few ngx-webstorage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yodamad / svn2git / src / main / webapp / app / app.module.ts View on Github external
import * as moment from 'moment';
// jhipster-needle-angular-add-module-import JHipster will add new module here
import { JhiMainComponent, NavbarComponent, FooterComponent, PageRibbonComponent, ActiveMenuDirective, ErrorComponent } from './layouts';
import { Svn2GitMigrationModule } from 'app/migration/migation-process.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { BrowserModule } from '@angular/platform-browser';
import { ConfigurationService } from 'app/shared/service/configuration-service';

export function configInit(configService: ConfigurationService) {
    return () => configService.init();
}

@NgModule({
    imports: [
        Svn2GitAppRoutingModule,
        NgxWebstorageModule.forRoot({ prefix: 'jhi', separator: '-' }),
        Svn2GitSharedModule,
        Svn2GitCoreModule,
        Svn2GitHomeModule,
        Svn2GitAccountModule,
        Svn2GitEntityModule,
        Svn2GitMigrationModule,
        BrowserAnimationsModule,
        BrowserModule
        // jhipster-needle-angular-add-module JHipster will add new module here
    ],
    declarations: [JhiMainComponent, NavbarComponent, ErrorComponent, PageRibbonComponent, ActiveMenuDirective, FooterComponent],
    providers: [
        {
            provide: HTTP_INTERCEPTORS,
            useClass: AuthInterceptor,
            multi: true,
github jhipster / jhipster-sample-app-elasticsearch / src / main / webapp / app / core / core.module.ts View on Github external
import * as moment from 'moment';
import { NgbDateAdapter, NgbDatepickerConfig } from '@ng-bootstrap/ng-bootstrap';
import { NgbDateMomentAdapter } from 'app/shared/util/datepicker-adapter';

import { AuthInterceptor } from 'app/blocks/interceptor/auth.interceptor';
import { AuthExpiredInterceptor } from 'app/blocks/interceptor/auth-expired.interceptor';
import { ErrorHandlerInterceptor } from 'app/blocks/interceptor/errorhandler.interceptor';
import { NotificationInterceptor } from 'app/blocks/interceptor/notification.interceptor';

import { fontAwesomeIcons } from './icons/font-awesome-icons';

@NgModule({
  imports: [
    HttpClientModule,
    CookieModule.forRoot(),
    NgxWebstorageModule.forRoot({ prefix: 'jhi', separator: '-' }),
    NgJhipsterModule.forRoot({
      // set below to true to make alerts look like toast
      alertAsToast: false,
      alertTimeout: 5000,
      i18nEnabled: true,
      defaultI18nLang: 'en'
    }),
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: translatePartialLoader,
        deps: [HttpClient]
      },
      missingTranslationHandler: {
        provide: MissingTranslationHandler,
        useFactory: missingTranslationHandler,
github dongyanghe / eikesi / manageMonolithic / src / main / webapp / app / app.module.ts View on Github external
import { ErrorHandlerInterceptor } from './blocks/interceptor/errorhandler.interceptor';
import { NotificationInterceptor } from './blocks/interceptor/notification.interceptor';
import { ManageMonolithicSharedModule } from 'app/shared';
import { ManageMonolithicCoreModule } from 'app/core';
import { ManageMonolithicAppRoutingModule } from './app-routing.module';
import { ManageMonolithicHomeModule } from './home/home.module';
import { ManageMonolithicAccountModule } from './account/account.module';
import { ManageMonolithicEntityModule } from './entities/entity.module';
import * as moment from 'moment';
// jhipster-needle-angular-add-module-import JHipster will add new module here
import { JhiMainComponent, NavbarComponent, FooterComponent, PageRibbonComponent, ActiveMenuDirective, ErrorComponent } from './layouts';

@NgModule({
  imports: [
    BrowserModule,
    NgxWebstorageModule.forRoot({ prefix: 'jhi', separator: '-' }),
    NgJhipsterModule.forRoot({
      // set below to true to make alerts look like toast
      alertAsToast: false,
      alertTimeout: 5000,
      i18nEnabled: true,
      defaultI18nLang: 'zh-cn'
    }),
    ManageMonolithicSharedModule.forRoot(),
    ManageMonolithicCoreModule,
    ManageMonolithicHomeModule,
    ManageMonolithicAccountModule,
    // jhipster-needle-angular-add-module JHipster will add new module here
    ManageMonolithicEntityModule,
    ManageMonolithicAppRoutingModule
  ],
  declarations: [JhiMainComponent, NavbarComponent, ErrorComponent, PageRibbonComponent, ActiveMenuDirective, FooterComponent],
github jhipster / jhipster-sample-app-gateway / src / main / webapp / app / core / core.module.ts View on Github external
import * as moment from 'moment';
import { NgbDateAdapter, NgbDatepickerConfig } from '@ng-bootstrap/ng-bootstrap';
import { NgbDateMomentAdapter } from 'app/shared/util/datepicker-adapter';

import { AuthInterceptor } from 'app/blocks/interceptor/auth.interceptor';
import { AuthExpiredInterceptor } from 'app/blocks/interceptor/auth-expired.interceptor';
import { ErrorHandlerInterceptor } from 'app/blocks/interceptor/errorhandler.interceptor';
import { NotificationInterceptor } from 'app/blocks/interceptor/notification.interceptor';

import { fontAwesomeIcons } from './icons/font-awesome-icons';

@NgModule({
  imports: [
    HttpClientModule,
    CookieModule.forRoot(),
    NgxWebstorageModule.forRoot({ prefix: 'jhi', separator: '-' }),
    NgJhipsterModule.forRoot({
      // set below to true to make alerts look like toast
      alertAsToast: false,
      alertTimeout: 5000
    })
  ],
  providers: [
    Title,
    {
      provide: LOCALE_ID,
      useValue: 'en'
    },
    { provide: NgbDateAdapter, useClass: NgbDateMomentAdapter },
    DatePipe,
    {
      provide: HTTP_INTERCEPTORS,
github dbelob / helloworld-web / helloworld-web-jhipster / src / main / webapp / app / core / core.module.ts View on Github external
import { CookieModule } from 'ngx-cookie';
import { NgxWebstorageModule } from 'ngx-webstorage';
import { NgJhipsterModule } from 'ng-jhipster';
import locale from '@angular/common/locales/en';

import * as moment from 'moment';
import { NgbDateAdapter, NgbDatepickerConfig } from '@ng-bootstrap/ng-bootstrap';
import { NgbDateMomentAdapter } from 'app/shared/util/datepicker-adapter';

import { fontAwesomeIcons } from './icons/font-awesome-icons';

@NgModule({
  imports: [
    HttpClientModule,
    CookieModule.forRoot(),
    NgxWebstorageModule.forRoot({ prefix: 'jhi', separator: '-' }),
    NgJhipsterModule.forRoot({
      // set below to true to make alerts look like toast
      alertAsToast: false,
      alertTimeout: 5000
    })
  ],
  providers: [
    Title,
    {
      provide: LOCALE_ID,
      useValue: 'en'
    },
    { provide: NgbDateAdapter, useClass: NgbDateMomentAdapter },
    DatePipe
  ]
})
github oktadeveloper / ionic-jhipster-starter / src / app / services / user / user.service.spec.ts View on Github external
beforeEach(() => TestBed.configureTestingModule({
    imports: [
      HttpClientTestingModule,
      TranslateModule.forRoot(),
      NgxWebstorageModule.forRoot()]
  }));
github xm-online / xm-webapp / src / app / layouts / main / main.component.spec.ts View on Github external
beforeEach(async(() => {
        TestBed.configureTestingModule({
            declarations: [
                XmMainComponent,
            ],
            imports: [
                NgxWebstorageModule.forRoot(),
            ],
            providers: [
                JhiEventManager,
                {
                    provide: JhiLanguageHelper,
                    useClass: Mock,
                },
                {
                    provide: ModulesLanguageHelper,
                    useClass: Mock,
                },
                {
                    provide: JhiLanguageService,
                    useClass: Mock,
                },
                {
github oktadeveloper / ionic-jhipster-starter / src / app / app.module.ts View on Github external
@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [
    BrowserModule,
    HttpClientModule,
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: createTranslateLoader,
        deps: [HttpClient]
      }
    }),
    IonicModule.forRoot(),
    NgxWebstorageModule.forRoot({ prefix: 'jhi', separator: '-' }),
    AppRoutingModule
  ],
  providers: [
    StatusBar,
    SplashScreen,
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
    {
      provide: HTTP_INTERCEPTORS,
      useClass: AuthInterceptor,
      multi: true
    },
    {
      provide: HTTP_INTERCEPTORS,
      useClass: AuthExpiredInterceptor,
      multi: true
    }
github oktadeveloper / ionic-jhipster-starter / src / app / pages / account / account.page.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [AccountPage],
      schemas: [CUSTOM_ELEMENTS_SCHEMA],
      imports: [TranslateModule.forRoot(), RouterTestingModule, NgxWebstorageModule.forRoot(), HttpClientTestingModule]
    }).compileComponents();
  }));
github oktadeveloper / ionic-jhipster-starter / src / app / services / auth / account.service.spec.ts View on Github external
beforeEach(() => TestBed.configureTestingModule({
    imports: [HttpClientTestingModule, NgxWebstorageModule.forRoot()]
  }));

ngx-webstorage

This library provides an easy to use service to manage the web storages (local and session) from your Angular application. It provides also two decorators to synchronize the component attributes and the web storages.

MIT
Latest version published 9 days ago

Package Health Score

78 / 100
Full package analysis