How to use the @nrwl/angular.NxModule.forRoot function in @nrwl/angular

To help you get started, we’ve selected a few @nrwl/angular 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 merlosy / ngx-material-file-input / apps / demo / src / app / app.module.ts View on Github external
import { MatButtonModule } from '@angular/material/button';
import { ReactiveFormsModule } from '@angular/forms';

import { AppComponent } from './app.component';
import { MaterialFileInputModule } from 'ngx-material-file-input';
import { CodeSampleComponent } from './code-sample/code-sample.component';
import { MenuComponent } from './menu/menu.component';
import { UsageComponent } from './usage/usage.component';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatListModule } from '@angular/material/list';
import { AppearanceComponent } from './appearance/appearance.component';

@NgModule({
  imports: [
    BrowserModule,
    NxModule.forRoot(),
    BrowserAnimationsModule,
    ReactiveFormsModule,
    // Material modules
    MatButtonModule,
    MatFormFieldModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatSidenavModule,
    MatToolbarModule,
    // Lib Module
    MaterialFileInputModule
  ],
  declarations: [
    AppComponent,
    AppearanceComponent,
github Verseghy / website_frontend / apps / frontend / src / app / modules / misc / reducer / colleagues / colleagues.effects.spec.ts View on Github external
beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [NxModule.forRoot(), StoreModule.forRoot({}), EffectsModule.forRoot([])],
      providers: [
        ColleaguesEffects,
        DataPersistence,
        provideMockActions(() => actions),
        {
          provide: ColleaguesService,
          useValue: ColleaguesServiceMock,
        },
      ],
    })

    effects = TestBed.get(ColleaguesEffects)
  })
github stefanoslig / angular-ngrx-nx-realworld-example-app / apps / conduit / src / app / app.module.ts View on Github external
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { NxModule } from '@nrwl/angular';

import { environment } from '../environments/environment';
import { AppComponent } from './app.component';
import { FooterComponent } from './layout/footer/footer.component';
import { NavbarComponent } from './layout/navbar/navbar.component';

@NgModule({
  imports: [
    ApiModule,
    AuthModule,
    BrowserModule,
    NxModule.forRoot(),
    RouterModule.forRoot(
      [
        {
          path: '',
          loadChildren: () =>
            import('@angular-ngrx-nx-realworld-example-app/home/src/lib/home.module').then(m => m.HomeModule),
        },
        {
          path: 'article/:slug',
          loadChildren: () =>
            import('@angular-ngrx-nx-realworld-example-app/article/src/lib/article.module').then(m => m.ArticleModule),
        },
        {
          path: 'settings',
          loadChildren: () =>
            import('@angular-ngrx-nx-realworld-example-app/settings/src/lib/settings.module').then(
github onehungrymind / angular-core-workshop / apps / dashboard / src / app / app.module.ts View on Github external
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NxModule } from '@nrwl/angular';
import { MaterialModule } from '@workshop/material';
import { UiLoginModule } from '@workshop/ui-login';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    NxModule.forRoot(),
    BrowserAnimationsModule,
    FormsModule,
    HttpClientModule,
    MaterialModule,
    UiLoginModule,
    AppRoutingModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}
github shlomiassaf / ngrid / apps / ngrid-demo-app / src / app / app.module.ts View on Github external
}

export const REQ_KEY = makeStateKey('req');

@NgModule({
  declarations: [AppComponent, DemoHomePageComponent, RouterLinkActiveNotify],
  imports: [
    BrowserModule.withServerTransition({ appId: 'serverApp' }),
    TransferHttpCacheModule,
    HttpClientModule,
    BrowserAnimationsModule,
    FlexModule,
    ExtendedModule,
    MetaModule.forRoot(),
    CacheModule.forRoot(),
    NxModule.forRoot(),
    PblDemoAppSharedModule,
    AppContentChunksModule,
    MatIconModule,
    MatButtonModule,
    MatMenuModule,
    MatListModule,
    MatTooltipModule,
    LazyCodePartsModule.forRoot(),
    RouterModule.forRoot(
      [
        {
          path: '',
          children: [
            {
              path: '**',
              component: MarkdownPageContainerComponent
github Verseghy / website_frontend / apps / frontend / src / app / modules / events / reducer / events.effects.spec.ts View on Github external
beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [NxModule.forRoot(), StoreModule.forRoot({}), EffectsModule.forRoot([])],
      providers: [EventsEffects, DataPersistence, provideMockActions(() => actions), { provide: HttpClient, useValue: httpMock }],
    })

    effects = TestBed.get(EventsEffects)
  })
github Verseghy / website_frontend / apps / frontend / src / app / modules / canteen / reducer / canteen / canteen.effects.spec.ts View on Github external
beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [NxModule.forRoot(), StoreModule.forRoot({}), EffectsModule.forRoot([])],
      providers: [
        CanteenEffects,
        DataPersistence,
        provideMockActions(() => actions),
        {
          provide: CanteenService,
          useValue: CanteenServiceMock,
        },
      ],
    })

    effects = TestBed.get(CanteenEffects)
  })
github Verseghy / website_frontend / apps / frontend / src / app / app.module.ts View on Github external
import { environment } from '../environments/environment'
import { ServiceWorkerModule } from '@angular/service-worker'

library.add(faCheck)

@NgModule({
  declarations: [AppComponent, HeaderComponent, FooterComponent],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    RoutingModule,
    HttpClientModule,
    FontAwesomeModule,
    FormsModule,
    LoadersModule,
    NxModule.forRoot(),
    StoreModule.forRoot({}),
    EffectsModule.forRoot([]),
    StoreDevtoolsModule.instrument({
      maxAge: 25,
    }),
    AngularFireModule.initializeApp(environment.firebase),
    ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
  ],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}
github nrwl / ngrx-example / apps / talks / src / app / app.module.ts View on Github external
FiltersComponent
  ],
  imports: [
    NoopAnimationsModule,
    BrowserModule,
    HttpClientModule,
    MatInputModule,
    MatCheckboxModule,
    MatCardModule,
    ReactiveFormsModule,
    RouterModule.forRoot([
      { path: '', pathMatch: 'full', redirectTo: '/talks' },
      { path: 'talks', component: TalksAndFiltersComponent },
      { path: 'talk/:id', component: TalkDetailsComponent }
    ]),
    NxModule.forRoot(),
    StoreModule.forRoot(
      {},
      {
        metaReducers: !environment.production ? [] : [],
        runtimeChecks: {
          strictActionImmutability: true,
          strictStateImmutability: true
        }
      }
    ),
    EffectsModule.forRoot([TalksEffects]),
    !environment.production ? StoreDevtoolsModule.instrument() : [],
    StoreRouterConnectingModule.forRoot(),
    StoreModule.forFeature(fromTalks.TALKS_FEATURE_KEY, fromTalks.reducer)
  ],
  providers: [Backend, WatchService],

@nrwl/angular

The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: - Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. - Gen

MIT
Latest version published 5 days ago

Package Health Score

92 / 100
Full package analysis