{{section.title}}
--
-
- - - - {{item.title}} - - -
We're sorry. The resource you are looking for cannot be found.
-
-
-
-
- `
-})
-export class CodeComponent implements OnChanges {
- ariaLabel = '';
-
- /** The code to be copied when clicking the copy button, this should not be HTML encoded */
- private codeText: string;
-
- /** Code that should be formatted with current inputs and displayed in the view. */
- set code(code: TrustedHTML) {
- this._code = code;
-
- if (!this._code.toString().trim()) {
- this.showMissingCodeMessage();
- } else {
- this.formatDisplayedCode();
- }
- }
- get code(): TrustedHTML {
- return this._code;
- }
- _code: TrustedHTML;
-
- /** Whether the copy button should be shown. */
- @Input() hideCopy: boolean;
-
- /** Language to render the code (e.g. javascript, typescript). */
- @Input() language: string | undefined;
-
- /**
- * Whether to display line numbers:
- * - If false: hide
- * - If true: show
- * - If number: show but start at that number
- */
- @Input() linenums: boolean | number | string | undefined;
-
- /** Path to the source of the code. */
- @Input() path: string;
-
- /** Region of the source of the code being displayed. */
- @Input() region: string;
-
- /** Optional header to be displayed above the code. */
- @Input()
- set header(header: string | undefined) {
- this._header = header;
- this.ariaLabel = this.header ? `Copy code snippet from ${this.header}` : '';
- }
- get header(): string|undefined { return this._header; }
- private _header: string | undefined;
-
- @Output() codeFormatted = new EventEmitter{{person.bio}}
- -We don't have any upcoming speaking engagements at the moment.
-- Until something comes up, make sure you check our YouTube channel - and follow us on social media. -
-- If you want us to be part of your event reach out on devrel@angular.io! -
-| Event | -Start date | -
|---|---|
| - {{ event.name }} - {{ event.name }} - | -{{ event.date.start }} | -
- You can also download this example. -
- - - {{title}} - - - {{title}} - - / download example - - - diff --git a/aio/src/app/custom-elements/live-example/live-example.component.spec.ts b/aio/src/app/custom-elements/live-example/live-example.component.spec.ts deleted file mode 100644 index 5bce9630b69..00000000000 --- a/aio/src/app/custom-elements/live-example/live-example.component.spec.ts +++ /dev/null @@ -1,230 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { Component, DebugElement } from '@angular/core'; -import { Location } from '@angular/common'; - -import { LiveExampleComponent, EmbeddedStackblitzComponent } from './live-example.component'; - -const defaultTestPath = '/test'; - -describe('LiveExampleComponent', () => { - let liveExampleDe: DebugElement; - let liveExampleComponent: LiveExampleComponent; - let fixture: ComponentFixture