repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/AbstractRenderer.ts | code/frameworks/angular/src/client/angular-beta/AbstractRenderer.ts | import type { ApplicationRef, NgModule } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import type { Subject } from 'rxjs';
import { BehaviorSubject } from 'rxjs';
import { stringify } from 'telejson';
import type { ICollection, StoryFnAngularReturnType } from '../types';
impo... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/StorybookProvider.ts | code/frameworks/angular/src/client/angular-beta/StorybookProvider.ts | import type { Provider } from '@angular/core';
import { InjectionToken, NgZone } from '@angular/core';
import type { Subject, Subscriber } from 'rxjs';
import { Observable } from 'rxjs';
import type { ICollection } from '../types';
export const STORY_PROPS = new InjectionToken<Subject<ICollection | undefined>>('STORY... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/StorybookModule.ts | code/frameworks/angular/src/client/angular-beta/StorybookModule.ts | import type { StoryFnAngularReturnType } from '../types';
import { computesTemplateFromComponent } from './ComputesTemplateFromComponent';
import { createStorybookWrapperComponent } from './StorybookWrapperComponent';
import type { PropertyExtractor } from './utils/PropertyExtractor';
export const getApplication = ({
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/CanvasRenderer.ts | code/frameworks/angular/src/client/angular-beta/CanvasRenderer.ts | import type { Parameters, StoryFnAngularReturnType } from '../types';
import { AbstractRenderer } from './AbstractRenderer';
export class CanvasRenderer extends AbstractRenderer {
public async render(options: {
storyFnAngular: StoryFnAngularReturnType;
forced: boolean;
parameters: Parameters;
compone... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/ComputesTemplateFromComponent.test.ts | code/frameworks/angular/src/client/angular-beta/ComputesTemplateFromComponent.test.ts | import { Component } from '@angular/core';
import type { ArgTypes } from 'storybook/internal/types';
import { describe, it, expect } from 'vitest';
import {
computesTemplateFromComponent,
computesTemplateSourceFromComponent,
} from './ComputesTemplateFromComponent';
import type { ISomeInterface } from './__testfixt... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts | code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts | // @vitest-environment happy-dom
import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
import { Component, ɵresetJitOptions } from '@angular/core';
import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { platformBrowserDynamic } from '@angular/platform-br... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/StorybookModule.test.ts | code/frameworks/angular/src/client/angular-beta/StorybookModule.test.ts | // @vitest-environment happy-dom
import type { NgModule } from '@angular/core';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { describe, expect, it } from 'vitest';
import { TestBed } from '@angular/core/testing';
import { BehaviorSubject } from 'rxjs';
import type { ICollection } fr... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/utils/NgModulesAnalyzer.ts | code/frameworks/angular/src/client/angular-beta/utils/NgModulesAnalyzer.ts | import { NgModule, ɵReflectionCapabilities as ReflectionCapabilities } from '@angular/core';
const reflectionCapabilities = new ReflectionCapabilities();
/**
* Avoid component redeclaration
*
* Checks recursively if the component has already been declared in all import Module
*/
export const isComponentAlreadyDec... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.ts | code/frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.ts | import { CommonModule } from '@angular/common';
import type { NgModule, Provider, importProvidersFrom } from '@angular/core';
import {
Component,
Directive,
Injectable,
InjectionToken,
Input,
Output,
Pipe,
ɵReflectionCapabilities as ReflectionCapabilities,
VERSION,
} from '@angular/core';
import { Bro... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/utils/BootstrapQueue.ts | code/frameworks/angular/src/client/angular-beta/utils/BootstrapQueue.ts | import type { ApplicationRef } from '@angular/core';
const queue: Array<() => Promise<void>> = [];
let isProcessing = false;
/**
* Reset compiled components because we often want to compile the same component with more than one
* NgModule.
*/
const resetCompiledComponents = async () => {
try {
// Clear globa... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/utils/BootstrapQueue.test.ts | code/frameworks/angular/src/client/angular-beta/utils/BootstrapQueue.test.ts | // @vitest-environment happy-dom
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { Subject, lastValueFrom } from 'rxjs';
import { queueBootstrapping } from './BootstrapQueue';
const instantWaitFor = (fn: () => void) => {
return vi.waitFor(fn, {
interval: 0,
timeout: 10000,
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.ts | code/frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.ts | import type { Type } from '@angular/core';
import {
Component,
Directive,
Input,
Output,
Pipe,
ɵReflectionCapabilities as ReflectionCapabilities,
} from '@angular/core';
const reflectionCapabilities = new ReflectionCapabilities();
export type ComponentInputsOutputs = {
inputs: {
propName: string;
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/utils/Zoneless.ts | code/frameworks/angular/src/client/angular-beta/utils/Zoneless.ts | export const getProvideZonelessChangeDetectionFn = async () => {
const angularCore: any = await import('@angular/core');
return 'provideExperimentalZonelessChangeDetection' in angularCore
? angularCore.provideExperimentalZonelessChangeDetection
: 'provideZonelessChangeDetection' in angularCore
? angu... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.test.ts | code/frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.test.ts | // @vitest-environment happy-dom
import type { Type } from '@angular/core';
import {
Component,
ComponentFactoryResolver,
Directive,
EventEmitter,
HostBinding,
Injectable,
Input,
Output,
Pipe,
input,
output,
} from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { Browser... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/utils/StoryUID.ts | code/frameworks/angular/src/client/angular-beta/utils/StoryUID.ts | /** Count of stories for each storyId. */
const storyCounts = new Map<string, number>();
/**
* Increments the count for a storyId and returns the next UID.
*
* When a story is bootstrapped, the storyId is used as the element tag. That becomes an issue when
* a story is rendered multiple times in the same docs page... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.test.ts | code/frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.test.ts | import { CommonModule } from '@angular/common';
import { Component, Directive, Injectable, InjectionToken, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import {
BrowserAnimationsModule,
NoopAnimationsModule,
provideAnimations,
provideNoopAnimations,
} from '@angula... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/utils/NgModulesAnalyzer.test.ts | code/frameworks/angular/src/client/angular-beta/utils/NgModulesAnalyzer.test.ts | import { Component, NgModule } from '@angular/core';
import { describe, expect, it } from 'vitest';
import { isComponentAlreadyDeclared } from './NgModulesAnalyzer';
const FooComponent = Component({})(class {});
const BarComponent = Component({})(class {});
const BetaModule = NgModule({ declarations: [FooComponent]... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/__testfixtures__/input.component.ts | code/frameworks/angular/src/client/angular-beta/__testfixtures__/input.component.ts | import { Component, EventEmitter, Input, Output } from '@angular/core';
export const exportedConstant = 'An exported constant';
export enum ButtonAccent {
'Normal' = 'Normal',
'High' = 'High',
}
export interface ISomeInterface {
one: string;
two: boolean;
three: any[];
ref?: ISomeInterface;
}
@Component... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/__testfixtures__/test.module.ts | code/frameworks/angular/src/client/angular-beta/__testfixtures__/test.module.ts | import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
@NgModule({
imports: [CommonModule, HttpClientModule],
})
export class WithOfficialModule {}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/button.component.ts | code/frameworks/angular/template/stories/button.component.ts | import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
standalone: false,
selector: 'storybook-button-component',
template: ` <button (click)="onClick.emit($event)">{{ text }}</button> `,
styles: [
`
button {
cursor: pointer;
margin: 10px;
border:... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/decorators/theme-decorator/decorators.stories.ts | code/frameworks/angular/template/stories/core/decorators/theme-decorator/decorators.stories.ts | import type { Args, Meta } from '@storybook/angular';
import { componentWrapperDecorator } from '@storybook/angular';
export const Base = (args: Args) => ({
template: 'Change sb_theme with the brush in toolbar',
props: {
...args,
},
});
export default {
// title: 'Core / Decorators / Theme Decorators',
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/child.component.ts | code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/child.component.ts | import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
standalone: false,
selector: 'child-component',
template: `
Child<br />
Input text: {{ childText }} <br />
Output : <button (click)="onClickChild.emit($event)">Click here !</button> <br />
Private text: {{ childPrivateText }... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/parent.component.ts | code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/parent.component.ts | import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
standalone: false,
selector: 'parent-component',
template: `
Parent<br />
Input text: {{ parentText }} <br />
Output : <button (click)="onClickParent.emit($event)">Click here !</button> <br />
<div style="margin: 3em; border... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/decorators.stories.ts | code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/decorators.stories.ts | // your-component.stories.ts
import type { Args, Meta, StoryObj } from '@storybook/angular';
import { componentWrapperDecorator, moduleMetadata } from '@storybook/angular';
import ChildComponent from './child.component';
import ParentComponent from './parent.component';
const meta: Meta<ChildComponent> = {
// title... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/moduleMetadata/merge-default-and-story.stories.ts | code/frameworks/angular/template/stories/core/moduleMetadata/merge-default-and-story.stories.ts | import type { Meta, StoryFn } from '@storybook/angular';
import { moduleMetadata } from '@storybook/angular';
import { CustomPipePipe } from './angular-src/custom.pipe';
import { DEFAULT_NAME, ITEMS, TokenComponent } from './angular-src/token.component';
export const MergeWithDefaultModuleMetadata: StoryFn = () => ({... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/moduleMetadata/in-stories.stories.ts | code/frameworks/angular/template/stories/core/moduleMetadata/in-stories.stories.ts | import type { Meta, StoryFn } from '@storybook/angular';
import { DEFAULT_NAME, ITEMS, TokenComponent } from './angular-src/token.component';
export const Individual1: StoryFn = () => ({
template: `<storybook-simple-token-component [name]="name"></storybook-simple-token-component>`,
props: {
name: 'Prop Name'... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/moduleMetadata/in-export-default.stories.ts | code/frameworks/angular/template/stories/core/moduleMetadata/in-export-default.stories.ts | import type { Meta, StoryFn } from '@storybook/angular';
import { moduleMetadata } from '@storybook/angular';
import { DEFAULT_NAME, ITEMS, TokenComponent } from './angular-src/token.component';
export const Story1: StoryFn = () => ({
template: `<storybook-simple-token-component [name]="name"></storybook-simple-tok... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/custom.pipe.ts | code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/custom.pipe.ts | import type { PipeTransform } from '@angular/core';
import { Pipe } from '@angular/core';
@Pipe({
standalone: false,
name: 'customPipe',
})
export class CustomPipePipe implements PipeTransform {
transform(value: any, args?: any): any {
return `CustomPipe: ${value}`;
}
}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/dummy.service.ts | code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/dummy.service.ts | import { Injectable } from '@angular/core';
@Injectable({ providedIn: 'root' })
export class DummyService {
constructor() {}
getItems() {
return new Promise((resolve) => {
setTimeout(() => {
resolve(['Joe', 'Jane']);
}, 2000);
});
}
}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/token.component.ts | code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/token.component.ts | import { Component, Input, InjectionToken, Inject, Optional } from '@angular/core';
export const ITEMS = new InjectionToken<string[]>('TokenComponent.Items');
export const DEFAULT_NAME = new InjectionToken<string>('TokenComponent.DefaultName');
@Component({
standalone: false,
selector: 'storybook-simple-token-com... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/service.component.ts | code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/service.component.ts | import type { OnInit } from '@angular/core';
import { Component, Input } from '@angular/core';
import type { DummyService } from './dummy.service';
@Component({
standalone: false,
selector: 'storybook-simple-service-component',
template: `<p>{{ name }}:</p>
<ul>
<li *ngFor="let item of items">{{ item }}</li>
<... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/styles/story-styles.stories.ts | code/frameworks/angular/template/stories/core/styles/story-styles.stories.ts | import type { Meta, StoryFn } from '@storybook/angular';
import { moduleMetadata } from '@storybook/angular';
import Button from '../../button.component';
export const TemplateStory: StoryFn = () => ({
template: `<storybook-button-component [text]="text" (onClick)="onClick($event)"></storybook-button-component>`,
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/core/parameters/bootstrap-options.stories.ts | code/frameworks/angular/template/stories/core/parameters/bootstrap-options.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { Component } from '@angular/core';
@Component({
standalone: false,
selector: 'component-with-whitespace',
preserveWhitespaces: true,
template: ` <div>
<p>Some content</p>
</div>`,
})
class ComponentWithWhitespace {}
const meta: Meta<Component... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-pipe/with-pipe.component.ts | code/frameworks/angular/template/stories/basics/component-with-pipe/with-pipe.component.ts | import { Component, Input } from '@angular/core';
@Component({
standalone: false,
selector: 'storybook-with-pipe',
template: ` <h1>{{ field | customPipe }}</h1> `,
})
export class WithPipeComponent {
@Input()
field: any;
}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-pipe/custom-pipes.stories.ts | code/frameworks/angular/template/stories/basics/component-with-pipe/custom-pipes.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { moduleMetadata } from '@storybook/angular';
import { CustomPipePipe } from './custom.pipe';
import { WithPipeComponent } from './with-pipe.component';
const meta: Meta<WithPipeComponent> = {
// title: 'Basics / Component / With Pipes',
component: ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-pipe/custom.pipe.ts | code/frameworks/angular/template/stories/basics/component-with-pipe/custom.pipe.ts | import type { PipeTransform } from '@angular/core';
import { Pipe } from '@angular/core';
@Pipe({
standalone: false,
name: 'customPipe',
})
export class CustomPipePipe implements PipeTransform {
transform(value: any, args?: any): any {
return `CustomPipe: ${value}`;
}
}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-ng-on-destroy/component-with-on-destroy.stories.ts | code/frameworks/angular/template/stories/basics/component-with-ng-on-destroy/component-with-on-destroy.stories.ts | import type { OnDestroy, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import type { Meta, StoryObj } from '@storybook/angular';
@Component({
standalone: false,
selector: 'on-destroy',
template: `Current time: {{ time }} <br />
📝 The current time in console should no longer display a... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/ng-module/import-module-for-root.stories.ts | code/frameworks/angular/template/stories/basics/ng-module/import-module-for-root.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { StoryFn, moduleMetadata } from '@storybook/angular';
import { CHIP_COLOR } from './angular-src/chip-color.token';
import { ChipsGroupComponent } from './angular-src/chips-group.component';
import { ChipsModule } from './angular-src/chips.module';
cons... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/ng-module/import-module-chip.stories.ts | code/frameworks/angular/template/stories/basics/ng-module/import-module-chip.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { StoryFn, moduleMetadata } from '@storybook/angular';
import { ChipComponent } from './angular-src/chip.component';
import { ChipsModule } from './angular-src/chips.module';
const meta: Meta<ChipComponent> = {
component: ChipComponent,
decorators: ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/ng-module/import-module.stories.ts | code/frameworks/angular/template/stories/basics/ng-module/import-module.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { StoryFn, moduleMetadata } from '@storybook/angular';
import { ChipsGroupComponent } from './angular-src/chips-group.component';
import { ChipsModule } from './angular-src/chips.module';
const meta: Meta<ChipsGroupComponent> = {
// title: 'Basics / N... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip-text.pipe.ts | code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip-text.pipe.ts | import type { PipeTransform } from '@angular/core';
import { Pipe } from '@angular/core';
@Pipe({
standalone: false,
name: 'chipText',
})
export class ChipTextPipe implements PipeTransform {
transform(value: string): string {
return Array.from(value)
.map((char) => this.accentVowel(char))
.join('... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips-group.component.ts | code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips-group.component.ts | import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
standalone: false,
selector: 'storybook-chips-group',
template: `
<storybook-chip
*ngFor="let chip of chips"
class="chip"
[displayText]="chip.text"
(removeClicked)="removeChipClick.emit(chip.id)"
></storybook-chip>
<... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips.module.ts | code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips.module.ts | import type { ModuleWithProviders } from '@angular/core';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ChipComponent } from './chip.component';
import { ChipsGroupComponent } from './chips-group.component';
import { ChipTextPipe } from './chip-text.pipe';
import { C... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip-color.token.ts | code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip-color.token.ts | import { InjectionToken } from '@angular/core';
export const CHIP_COLOR = new InjectionToken<string>('chip-color');
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip.component.ts | code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip.component.ts | import { Component, Input, Output, EventEmitter, Inject, HostBinding } from '@angular/core';
import { CHIP_COLOR } from './chip-color.token';
@Component({
standalone: false,
selector: 'storybook-chip',
template: `
<span class="text">{{ displayText | chipText }}</span>
<div class="remove" (click)="removeClick... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/class-selector.component.stories.ts | code/frameworks/angular/template/stories/basics/component-with-complex-selectors/class-selector.component.stories.ts | import { ClassSelectorComponent } from './class-selector.component';
export default {
// title: 'Basics / Component / With Complex Selectors',
component: ClassSelectorComponent,
};
export const ClassSelectors = {};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/attribute-selectors.component.stories.ts | code/frameworks/angular/template/stories/basics/component-with-complex-selectors/attribute-selectors.component.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { AttributeSelectorComponent } from './attribute-selector.component';
const meta: Meta<AttributeSelectorComponent> = {
// title: 'Basics / Component / With Complex Selectors',
component: AttributeSelectorComponent,
};
export default meta;
type Sto... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-selector.component.ts | code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-selector.component.ts | // ElementRef must be a regular import, not a type-only import, because it's used in dependency injection.
// Type-only imports are stripped during compilation, causing runtime errors like "ElementRef is not defined".
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
import { ComponentFactoryResolv... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/class-selector.component.ts | code/frameworks/angular/template/stories/basics/component-with-complex-selectors/class-selector.component.ts | // ElementRef must be a regular import, not a type-only import, because it's used in dependency injection.
// Type-only imports are stripped during compilation, causing runtime errors like "ElementRef is not defined".
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
import { ComponentFactoryResolv... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-selector.component.stories.ts | code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-selector.component.stories.ts | import { MultipleSelectorComponent } from './multiple-selector.component';
export default {
// title: 'Basics / Component / With Complex Selectors',
component: MultipleSelectorComponent,
};
export const MultipleSelectors = {};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-class-selector.component.stories.ts | code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-class-selector.component.stories.ts | import { MultipleClassSelectorComponent } from './multiple-selector.component';
export default {
// title: 'Basics / Component / With Complex Selectors',
component: MultipleClassSelectorComponent,
};
export const MultipleClassSelectors = {};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/attribute-selector.component.ts | code/frameworks/angular/template/stories/basics/component-with-complex-selectors/attribute-selector.component.ts | // ElementRef must be a regular import, not a type-only import, because it's used in dependency injection.
// Type-only imports are stripped during compilation, causing runtime errors like "ElementRef is not defined".
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
import { ComponentFactoryResolv... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva-component.stories.ts | code/frameworks/angular/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva-component.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { StoryFn, moduleMetadata } from '@storybook/angular';
import { FormsModule } from '@angular/forms';
import { CustomCvaComponent } from './custom-cva.component';
const meta: Meta<CustomCvaComponent> = {
// title: 'Basics / Angular forms / ControlValu... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva.component.ts | code/frameworks/angular/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva.component.ts | import { Component, forwardRef } from '@angular/core';
import type { ControlValueAccessor } from '@angular/forms';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
const NOOP = () => {};
@Component({
standalone: false,
selector: 'storybook-custom-cva-component',
template: ` <div>{{ value }}</div>
<input type... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-template/template.stories.ts | code/frameworks/angular/template/stories/basics/component-with-template/template.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { argsToTemplate } from '@storybook/angular';
import { Template } from './template.component';
const meta: Meta<Template> = {
component: Template,
};
export default meta;
type Story = StoryObj<Template>;
export const Default: Story = {
render: (a... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-template/template.component.ts | code/frameworks/angular/template/stories/basics/component-with-template/template.component.ts | import { CommonModule } from '@angular/common';
import { Component, EventEmitter, Input, Output } from '@angular/core';
@Component({
selector: 'app-template',
imports: [CommonModule],
template: `<div (click)="event($event)">
Label: {{ label }}
<br />
Label2: {{ label2 }}
<br />
<button (click)="inc()">... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector-ng-component-outlet.stories.ts | code/frameworks/angular/template/stories/basics/component-without-selector/without-selector-ng-component-outlet.stories.ts | import type { OnInit, Type } from '@angular/core';
import { Component, Injector, Input } from '@angular/core';
import type { Meta, StoryObj } from '@storybook/angular';
import { componentWrapperDecorator, moduleMetadata } from '@storybook/angular';
import { WithoutSelectorComponent, WITHOUT_SELECTOR_DATA } from './with... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector.component.ts | code/frameworks/angular/template/stories/basics/component-without-selector/without-selector.component.ts | import { Component, Inject, InjectionToken, Optional } from '@angular/core';
export const WITHOUT_SELECTOR_DATA = new InjectionToken<{ color: string; name: string }>(
'WITHOUT_SELECTOR_DATA'
);
@Component({
standalone: false,
template: `My name in color :
<div [style.color]="color">{{ name }}</div>
<ng-content>... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector.stories.ts | code/frameworks/angular/template/stories/basics/component-without-selector/without-selector.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { moduleMetadata } from '@storybook/angular';
import { WITHOUT_SELECTOR_DATA, WithoutSelectorComponent } from './without-selector.component';
const meta: Meta<WithoutSelectorComponent> = {
// title: 'Basics / Component / without selector',
component... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-on-push/on-push.stories.ts | code/frameworks/angular/template/stories/basics/component-with-on-push/on-push.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { OnPushBoxComponent } from './on-push-box.component';
const meta: Meta<OnPushBoxComponent> = {
// title: 'Basics / Component / With OnPush strategy',
component: OnPushBoxComponent,
argTypes: {
word: { control: 'text' },
bgColor: { control... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-on-push/on-push-box.component.ts | code/frameworks/angular/template/stories/basics/component-with-on-push/on-push-box.component.ts | import { Component, Input, ChangeDetectionStrategy, HostBinding } from '@angular/core';
@Component({
standalone: false,
selector: 'storybook-on-push-box',
template: ` Word of the day: {{ word }} `,
styles: [
`
:host {
display: block;
padding: 1rem;
width: fit-content;
}
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-style/styled.component.stories.ts | code/frameworks/angular/template/stories/basics/component-with-style/styled.component.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { StyledComponent } from './styled.component';
const meta: Meta = {
// title: 'Basics / Component / With StyleUrls',
component: StyledComponent,
};
export default meta;
type Story = StoryObj<StyledComponent>;
export const ComponentWithStyles: Sto... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-style/styled.component.ts | code/frameworks/angular/template/stories/basics/component-with-style/styled.component.ts | import { Component } from '@angular/core';
@Component({
standalone: false,
selector: 'storybook-styled-component',
templateUrl: './styled.component.html',
styleUrls: ['./styled.component.css', './styled.component.scss'],
})
export class StyledComponent {}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-provider/di.component.ts | code/frameworks/angular/template/stories/basics/component-with-provider/di.component.ts | // ElementRef must be a regular import, not a type-only import, because it's used in dependency injection.
// Type-only imports are stripped during compilation, causing runtime errors like "ElementRef is not defined".
// Do not remove `Inject` even though it seems unused, it is used in the constructor.
// eslint-disabl... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-provider/di.component.stories.ts | code/frameworks/angular/template/stories/basics/component-with-provider/di.component.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { DiComponent } from './di.component';
const meta: Meta<DiComponent> = {
// title: 'Basics / Component / With Provider',
component: DiComponent,
};
export default meta;
type Story = StoryObj<DiComponent>;
export const InputsAndInjectDependencies:... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-ng-content/ng-content-simple.stories.ts | code/frameworks/angular/template/stories/basics/component-with-ng-content/ng-content-simple.stories.ts | import { Component } from '@angular/core';
import type { Meta, StoryObj } from '@storybook/angular';
@Component({
standalone: false,
selector: 'storybook-with-ng-content',
template: `Content value:
<div style="color: #1e88e5"><ng-content></ng-content></div>`,
})
class WithNgContentComponent {}
const meta: Meta... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-ng-content/ng-content-about-parent.stories.ts | code/frameworks/angular/template/stories/basics/component-with-ng-content/ng-content-about-parent.stories.ts | import { Component, Input } from '@angular/core';
import type { Meta, StoryObj } from '@storybook/angular';
import { componentWrapperDecorator } from '@storybook/angular';
@Component({
standalone: false,
selector: 'sb-button',
template: `<button [style.background-color]="color"><ng-content></ng-content></button>... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-inheritance/icon-button.component.ts | code/frameworks/angular/template/stories/basics/component-with-inheritance/icon-button.component.ts | import { Component, Input } from '@angular/core';
import { BaseButtonComponent } from './base-button.component';
@Component({
standalone: false,
selector: `storybook-icon-button`,
template: ` <button>{{ label }} - {{ icon }}</button> `,
})
export class IconButtonComponent extends BaseButtonComponent {
@Input()... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-inheritance/base-button.component.ts | code/frameworks/angular/template/stories/basics/component-with-inheritance/base-button.component.ts | import { Component, Input } from '@angular/core';
@Component({
standalone: false,
selector: `storybook-base-button`,
template: ` <button>{{ label }}</button> `,
})
export class BaseButtonComponent {
@Input()
label?: string;
}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-inheritance/base-button.stories.ts | code/frameworks/angular/template/stories/basics/component-with-inheritance/base-button.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { BaseButtonComponent } from './base-button.component';
const meta: Meta<BaseButtonComponent> = {
// title: 'Basics / Component / With Inheritance',
component: BaseButtonComponent,
};
export default meta;
export const BaseButton: StoryObj<BaseButt... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-inheritance/icon-button.stories.ts | code/frameworks/angular/template/stories/basics/component-with-inheritance/icon-button.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { IconButtonComponent } from './icon-button.component';
const meta: Meta<IconButtonComponent> = {
// title: 'Basics / Component / With Inheritance',
component: IconButtonComponent,
};
export default meta;
type Story = StoryObj<IconButtonComponent>... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.stories.ts | code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import {
EnumNumeric,
EnumNumericInitial,
EnumStringValues,
EnumsComponent,
} from './enums.component';
const meta: Meta<EnumsComponent> = {
// title: 'Basics / Component / With Enum Types',
component: EnumsComponent,
};
export default meta;
type... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.ts | code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.ts | import { Component, Input } from '@angular/core';
/** This component is used for testing the various forms of enum types */
@Component({
standalone: false,
selector: 'app-enums',
templateUrl: './enums.component.html',
})
export class EnumsComponent {
/** Union Type of string literals */
@Input() unionType?: ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/argTypes/doc-injectable/doc-injectable.stories.ts | code/frameworks/angular/template/stories/argTypes/doc-injectable/doc-injectable.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { DocInjectableService } from './doc-injectable.service';
const meta: Meta<DocInjectableService> = {
component: DocInjectableService,
};
export default meta;
type Story = StoryObj<DocInjectableService>;
export const Basic: Story = {
render: () =>... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/argTypes/doc-injectable/doc-injectable.service.ts | code/frameworks/angular/template/stories/argTypes/doc-injectable/doc-injectable.service.ts | import { Injectable } from '@angular/core';
import { HttpHeaders } from '@angular/common/http';
/** This is an Angular Injectable example that has a Prop Table. */
@Injectable({
providedIn: 'root',
})
export class DocInjectableService {
/** Auth headers to use. */
auth: any;
constructor() {
this.auth = ne... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.stories.ts | code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { argsToTemplate } from '@storybook/angular';
import { DocButtonComponent } from './doc-button.component';
const meta: Meta<DocButtonComponent<any>> = {
component: DocButtonComponent,
};
export default meta;
type Story = StoryObj<DocButtonComponent<... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.component.ts | code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.component.ts | import type { ElementRef } from '@angular/core';
import {
Component,
EventEmitter,
HostBinding,
HostListener,
Input,
Output,
ViewChild,
} from '@angular/core';
export const exportedConstant = 'An exported constant';
export type ButtonSize = 'small' | 'medium' | 'large' | 'xlarge';
export interface ISom... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/argTypes/doc-pipe/doc-pipe.pipe.ts | code/frameworks/angular/template/stories/argTypes/doc-pipe/doc-pipe.pipe.ts | import type { PipeTransform } from '@angular/core';
import { Pipe } from '@angular/core';
/** This is an Angular Pipe example that has a Prop Table. */
@Pipe({
standalone: false,
name: 'docPipe',
})
export class DocPipe implements PipeTransform {
/**
* Transforms a string into uppercase.
*
* @param valu... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/argTypes/doc-pipe/doc-pipe.stories.ts | code/frameworks/angular/template/stories/argTypes/doc-pipe/doc-pipe.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { DocPipe } from './doc-pipe.pipe';
const meta: Meta<DocPipe> = {
component: DocPipe,
};
export default meta;
type Story = StoryObj<DocPipe>;
export const Basic: Story = {
render: () => ({
moduleMetadata: {
declarations: [DocPipe],
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/argTypes/doc-directive/doc-directive.stories.ts | code/frameworks/angular/template/stories/argTypes/doc-directive/doc-directive.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { DocDirective } from './doc-directive.directive';
const meta: Meta<DocDirective> = {
component: DocDirective,
};
export default meta;
type Story = StoryObj<DocDirective>;
export const Basic: Story = {
render: () => ({
moduleMetadata: {
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/argTypes/doc-directive/doc-directive.directive.ts | code/frameworks/angular/template/stories/argTypes/doc-directive/doc-directive.directive.ts | // ElementRef must be a regular import, not a type-only import, because it's used in dependency injection.
// Type-only imports are stripped during compilation, causing runtime errors like "ElementRef is not defined".
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
import { ElementRef, AfterViewI... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/others/issues/12009-unknown-component.stories.ts | code/frameworks/angular/template/stories/others/issues/12009-unknown-component.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import Button from '../../button.component';
const meta: Meta<Button> = {
// title: 'Others / Issues / 12009 unknown component',
component: Button,
};
export default meta;
type Story = StoryObj<Button>;
export const Basic: Story = {
args: { text: 'Unk... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories/others/app-initializer-use-factory/app-initializer-use-factory.stories.ts | code/frameworks/angular/template/stories/others/app-initializer-use-factory/app-initializer-use-factory.stories.ts | import { action } from 'storybook/actions';
import type { Meta, StoryObj } from '@storybook/angular';
import { moduleMetadata } from '@storybook/angular';
import { APP_INITIALIZER } from '@angular/core';
import Button from '../../button.component';
const meta: Meta<Button> = {
component: Button,
render: (args) =... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories_angular-cli-default-ts/signal/button.component.ts | code/frameworks/angular/template/stories_angular-cli-default-ts/signal/button.component.ts | import { Component, Input, input, output } from '@angular/core';
@Component({
standalone: false,
// Needs to be a different name to the CLI template button
selector: 'storybook-signal-button',
template: ` <button
type="button"
(click)="onClick.emit($event)"
[ngClass]="classes"
[ngStyle]="{ 'background-... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories_angular-cli-default-ts/signal/button.stories.ts | code/frameworks/angular/template/stories_angular-cli-default-ts/signal/button.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { fn } from 'storybook/test';
import SignalButtonComponent from './button.component';
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
const meta: Meta<SignalButtonComponent> = {
component: SignalButtonComponent,
ta... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/components/form.component.ts | code/frameworks/angular/template/components/form.component.ts | import { Component, output, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';
@Component({
standalone: true,
imports: [FormsModule],
selector: 'storybook-form',
template: `
<form id="interaction-test-form" ngNativeValidate (submit)="handleSubmit($event)">
<label>
Enter Valu... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/components/button.component.ts | code/frameworks/angular/template/components/button.component.ts | import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
standalone: false,
// Needs to be a different name to the CLI template button
selector: 'storybook-framework-button',
template: ` <button
type="button"
(click)="onClick.emit($event)"
[ngClass]="classes"
[ngStyle]="{ 'b... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/components/pre.component.ts | code/frameworks/angular/template/components/pre.component.ts | import { Component, Input } from '@angular/core';
@Component({
standalone: false,
selector: 'storybook-pre',
template: `<pre data-testid="pre" [ngStyle]="style">{{ finalText }}</pre>`,
})
export default class PreComponent {
/** Styles to apply to the component */
@Input()
style?: object;
/** An object t... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/components/html.component.ts | code/frameworks/angular/template/components/html.component.ts | import { Component, Input } from '@angular/core';
// DomSanitizer must be a regular import, not a type-only import, because it's used in dependency injection.
// Type-only imports are stripped during compilation, causing runtime errors like "DomSanitizer is not defined".
// eslint-disable-next-line @typescript-eslint/c... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories_angular-cli-prerelease/signal/button.component.ts | code/frameworks/angular/template/stories_angular-cli-prerelease/signal/button.component.ts | import { Component, Input, input, output } from '@angular/core';
@Component({
standalone: false,
// Needs to be a different name to the CLI template button
selector: 'storybook-signal-button',
template: ` <button
type="button"
(click)="onClick.emit($event)"
[ngClass]="classes"
[ngStyle]="{ 'background-... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/stories_angular-cli-prerelease/signal/button.stories.ts | code/frameworks/angular/template/stories_angular-cli-prerelease/signal/button.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { fn } from 'storybook/test';
import SignalButtonComponent from './button.component';
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
const meta: Meta<SignalButtonComponent> = {
component: SignalButtonComponent,
ta... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/cli/button.component.ts | code/frameworks/angular/template/cli/button.component.ts | import { CommonModule } from '@angular/common';
import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'storybook-button',
standalone: true,
imports: [CommonModule],
template: ` <button
type="button"
(click)="onClick.emit($event)"
[ngClass]="classes"
[ngStyle]="{... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/cli/header.component.ts | code/frameworks/angular/template/cli/header.component.ts | import { Component, Input, Output, EventEmitter } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ButtonComponent } from './button.component';
import type { User } from './user';
@Component({
selector: 'storybook-header',
standalone: true,
imports: [CommonModule, ButtonComponent],... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/cli/header.stories.ts | code/frameworks/angular/template/cli/header.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { fn } from 'storybook/test';
import { HeaderComponent } from './header.component';
const meta: Meta<HeaderComponent> = {
title: 'Example/Header',
component: HeaderComponent,
// This component will have an automatically generated Autodocs entry: h... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/cli/button.stories.ts | code/frameworks/angular/template/cli/button.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { fn } from 'storybook/test';
import { ButtonComponent } from './button.component';
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
const meta: Meta<ButtonComponent> = {
title: 'Example/Button',
component: ButtonCo... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/cli/page.component.ts | code/frameworks/angular/template/cli/page.component.ts | import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HeaderComponent } from './header.component';
import type { User } from './user';
@Component({
selector: 'storybook-page',
standalone: true,
imports: [CommonModule, HeaderComponent],
template: `<article>
<stor... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/cli/page.stories.ts | code/frameworks/angular/template/cli/page.stories.ts | import type { Meta, StoryObj } from '@storybook/angular';
import { expect, userEvent, within } from 'storybook/test';
import { PageComponent } from './page.component';
const meta: Meta<PageComponent> = {
title: 'Example/Page',
component: PageComponent,
parameters: {
// More on how to position stories at: ht... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/template/cli/user.ts | code/frameworks/angular/template/cli/user.ts | export interface User {
name: string;
}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/svelte-vite/vitest.config.ts | code/frameworks/svelte-vite/vitest.config.ts | import { defineConfig, mergeConfig } from 'vitest/config';
import { vitestCommonConfig } from '../../vitest.shared';
export default mergeConfig(
vitestCommonConfig,
defineConfig({
// Add custom config here
})
);
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/svelte-vite/build-config.ts | code/frameworks/svelte-vite/build-config.ts | import type { BuildEntries } from '../../../scripts/build/utils/entry-utils';
const config: BuildEntries = {
entries: {
browser: [
{
exportEntries: ['.'],
entryPoint: './src/index.ts',
},
],
node: [
{
exportEntries: ['./preset'],
entryPoint: './src/preset... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.