<commit_before>import { NgModule } from '@angular/core';
import { CommonModule as NgCommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import { FormsModule as NgFormsModule, ReactiveFormsModule } from '@angular/forms';

import { CommonModule } from '../../common/common.module';
import { LegacyModule } from '../legacy/legacy.module';
import { ModalsModule } from '../modals/modals.module';
import { MindsFormsModule } from '../forms/forms.module';
import { CanDeactivateGuardService } from '../../services/can-deactivate-guard';
import { AdsModule } from '../ads/ads.module';

import { NewsfeedComponent } from './newsfeed.component';
import { NewsfeedSingleComponent } from './single/single.component';
import { NewsfeedBoostRotatorComponent } from './boost-rotator/boost-rotator.component';
import { NewsfeedTopComponent } from './feeds/top.component';
import { NewsfeedSubscribedComponent } from './feeds/subscribed.component';
import { NewsfeedBoostComponent } from './feeds/boost.component';

const routes: Routes = [
  { path: 'newsfeed', component: NewsfeedComponent,
    children: [
      { path: '', redirectTo: 'subscribed', pathMatch: 'full' },
      { path: 'top', component: NewsfeedTopComponent },
      { path: 'subscribed', component: NewsfeedSubscribedComponent, canDeactivate: [CanDeactivateGuardService] },
      { path: 'boost', component: NewsfeedBoostComponent, canDeactivate: [CanDeactivateGuardService] },
      { path: ':guid', component: NewsfeedSingleComponent },
    ] 
  },
];

@NgModule({
  imports: [
    NgCommonModule,
    RouterModule.forChild(routes),
    NgFormsModule,
    ReactiveFormsModule,
    CommonModule,
    LegacyModule,
    ModalsModule,
    MindsFormsModule,
    AdsModule,
  ],
  declarations: [
    NewsfeedComponent,
    NewsfeedSingleComponent,
    NewsfeedBoostRotatorComponent,
    NewsfeedTopComponent,
    NewsfeedSubscribedComponent,
    NewsfeedBoostComponent,
  ],
  exports: [
    NewsfeedBoostRotatorComponent,
  ],
  entryComponents: [
    NewsfeedComponent,
    NewsfeedSingleComponent,
  ]
})

export class NewsfeedModule {
}
<commit_msg>(fix): support single newsfeed page<commit_after>import { NgModule } from '@angular/core';
import { CommonModule as NgCommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import { FormsModule as NgFormsModule, ReactiveFormsModule } from '@angular/forms';

import { CommonModule } from '../../common/common.module';
import { LegacyModule } from '../legacy/legacy.module';
import { ModalsModule } from '../modals/modals.module';
import { MindsFormsModule } from '../forms/forms.module';
import { CanDeactivateGuardService } from '../../services/can-deactivate-guard';
import { AdsModule } from '../ads/ads.module';

import { NewsfeedComponent } from './newsfeed.component';
import { NewsfeedSingleComponent } from './single/single.component';
import { NewsfeedBoostRotatorComponent } from './boost-rotator/boost-rotator.component';
import { NewsfeedTopComponent } from './feeds/top.component';
import { NewsfeedSubscribedComponent } from './feeds/subscribed.component';
import { NewsfeedBoostComponent } from './feeds/boost.component';

const routes: Routes = [
  { path: 'newsfeed', component: NewsfeedComponent,
    children: [
      { path: '', redirectTo: 'subscribed', pathMatch: 'full' },
      { path: 'top', component: NewsfeedTopComponent },
      { path: 'subscribed', component: NewsfeedSubscribedComponent, canDeactivate: [CanDeactivateGuardService] },
      { path: 'boost', component: NewsfeedBoostComponent, canDeactivate: [CanDeactivateGuardService] },
    ],
  },
  { path: 'newsfeed/:guid', component: NewsfeedSingleComponent }, 
];

@NgModule({
  imports: [
    NgCommonModule,
    RouterModule.forChild(routes),
    NgFormsModule,
    ReactiveFormsModule,
    CommonModule,
    LegacyModule,
    ModalsModule,
    MindsFormsModule,
    AdsModule,
  ],
  declarations: [
    NewsfeedComponent,
    NewsfeedSingleComponent,
    NewsfeedBoostRotatorComponent,
    NewsfeedTopComponent,
    NewsfeedSubscribedComponent,
    NewsfeedBoostComponent,
  ],
  exports: [
    NewsfeedBoostRotatorComponent,
  ],
  entryComponents: [
    NewsfeedComponent,
    NewsfeedSingleComponent,
  ]
})

export class NewsfeedModule {
}

{'fraction_non_alphanumeric': 0.12609902822767238, 'fraction_numerical': 0.0, 'mean_word_length': 4.4860406091370555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4881421', 'n_tokens_mistral': 1233, 'n_tokens_neox': 1239, 'n_words': 262}