From 7075d3552c873ab018cd67068f0f800e98b12a48 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 18 Jul 2024 16:39:04 -0400 Subject: [PATCH] docs(refresher): update icon playgrounds to use addIcons usage --- .../advanced/angular/example_component_ts.md | 12 +++++ static/usage/v7/refresher/advanced/index.md | 16 ++++++- .../index_html.md} | 0 .../refresher/advanced/javascript/index_ts.md | 35 ++++++++++++++ .../advanced/angular/example_component_ts.md | 12 +++++ static/usage/v8/refresher/advanced/index.md | 16 ++++++- .../index_html.md} | 0 .../refresher/advanced/javascript/index_ts.md | 46 +++++++++++++++++++ 8 files changed, 133 insertions(+), 4 deletions(-) rename static/usage/v7/refresher/advanced/{javascript.md => javascript/index_html.md} (100%) create mode 100644 static/usage/v7/refresher/advanced/javascript/index_ts.md rename static/usage/v8/refresher/advanced/{javascript.md => javascript/index_html.md} (100%) create mode 100644 static/usage/v8/refresher/advanced/javascript/index_ts.md diff --git a/static/usage/v7/refresher/advanced/angular/example_component_ts.md b/static/usage/v7/refresher/advanced/angular/example_component_ts.md index 98888ac14fa..9d1f3a5f199 100644 --- a/static/usage/v7/refresher/advanced/angular/example_component_ts.md +++ b/static/usage/v7/refresher/advanced/angular/example_component_ts.md @@ -1,6 +1,9 @@ ```ts import { Component } from '@angular/core'; +import { addIcons } from 'ionicons'; +import { ellipse } from 'ionicons/icons'; + @Component({ selector: 'app-example', templateUrl: 'example.component.html', @@ -24,6 +27,15 @@ export class ExampleComponent { ]; public items = []; + constructor() { + /** + * Any icons you want to use in your application + * can be registered in app.component.ts and then + * referenced by name anywhere in your application. + */ + addIcons({ ellipse }); + } + ngOnInit() { this.addItems(5); } diff --git a/static/usage/v7/refresher/advanced/index.md b/static/usage/v7/refresher/advanced/index.md index cfc19169444..feb26191887 100644 --- a/static/usage/v7/refresher/advanced/index.md +++ b/static/usage/v7/refresher/advanced/index.md @@ -1,6 +1,7 @@ import Playground from '@site/src/components/global/Playground'; -import javascript from './javascript.md'; +import javascript_index_html from './javascript/index_html.md'; +import javascript_index_ts from './javascript/index_ts.md'; import react_main_tsx from './react/main_tsx.md'; import react_main_css from './react/main_css.md'; @@ -14,7 +15,15 @@ import angular_example_component_css from './angular/example_component_css.md';