mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-14 13:58:21 +00:00
feat(docs): add standalone example for angular (#2383)
This commit is contained in:
@@ -37,6 +37,20 @@ import { LucideAngularModule, File, Home, Menu, UserCheck } from 'lucide-angular
|
||||
export class AppModule { }
|
||||
```
|
||||
|
||||
or using standalone version:
|
||||
|
||||
```js
|
||||
import { LucideAngularModule, FileIcon } from 'lucide-angular';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
LucideAngularModule
|
||||
]
|
||||
})
|
||||
export class AppModule {
|
||||
readonly FileIcon = FileIcon;
|
||||
}
|
||||
```
|
||||
### Step 2: Use the icons in templates
|
||||
|
||||
Within your templates you may now use one of the following component tags to insert an icon:
|
||||
@@ -47,6 +61,13 @@ Within your templates you may now use one of the following component tags to ins
|
||||
<i-lucide name="menu" class="my-icon"></i-lucide>
|
||||
<span-lucide name="user-check" class="my-icon"></span-lucide>
|
||||
```
|
||||
for standalone
|
||||
```html
|
||||
<lucide-angular [img]="FileIcon" class="my-icon"></lucide-angular>
|
||||
<lucide-icon [img]="FileIcon" class="my-icon"></lucide-icon>
|
||||
<i-lucide [img]="FileIcon" class="my-icon"></i-lucide>
|
||||
<span-lucide [img]="FileIcon" class="my-icon"></span-lucide>
|
||||
```
|
||||
|
||||
### Props
|
||||
|
||||
|
||||
Reference in New Issue
Block a user