favorite-pages-angular
v1.4.15
Published
Stencil Component Starter
Readme
Stencil Component Starter
This is an Angular component for managing favorite pages, which allows users to:
- Add the current page as a favorite for the logged-in user.
- Display a bar with all favorite pages for the logged-in user.
- Edit and delete favorite page names.
The component uses FontAwesome for icons. Install FontAwesome using:
- npm install font-awesome --save
Getting Started
1. Install the component:
First, install the component in your Angular project:
npm install favorite-page
2. Import and define custom elements in your application:
In your main.ts, import and define custom elements:
import { defineCustomElements } from 'favorite-pages';
defineCustomElements(window);
3. Now you can use the custom elements in your HTML BUT you need to pass two dynamic properties: cultureCode and applicationId to the component:
In your HTML:
<favorite-pages [cultureCode]="cultureCode" [applicationId]="applicationId" ></favorite-pages>
In your Angular component, you can set these values dynamically:
export class YourComponent implements OnInit {
cultureCode: string;
applicationId: string;
ngOnInit() {
// You can update these values based on user preferences, etc.
}
}
If you encounter issues with icons not showing up:
1. Verify that FontAwesome is properly installed in your project.
2. Ensure that the FontAwesome link in the index.html file is correct and accessible. 