hughjdavey / ngx-stars Goto Github PK
View Code? Open in Web Editor NEWSimple stars rating component for Angular >= 2
License: Creative Commons Zero v1.0 Universal
Simple stars rating component for Angular >= 2
License: Creative Commons Zero v1.0 Universal
Processing legacy "View Engine" libraries:
- ngx-stars [es2015/esm2015] (https://github.com/hughjdavey/ngx-stars.git)
Encourage the library authors to publish an Ivy distribution.
Hi,
Thank you for the updates, but since 2 days i can not build the project anymore :
./src/app/modules/dressing/dressing.module.ts:13:0-43 - Error: Module not found: Error: Can't resolve 'ngx-stars' in '/Users/...
I am trying to change to custom icons. I tired many different ways to pass the icons to the customStarIcons input and it does not work for me:
scr/app/app.component.html:
<ngx-stars color="white" [customStarIcons]="iconUrls"></ngx-stars> <!-- This exists in the dom, but no icons shown -->
<ngx-stars></ngx-stars> <!-- this displays -->
<img src="../assets/star-outline.svg" alt="hello"> <!-- this displays -->
scr/app/app.component.ts:
export class AppComponent implements OnInit {
iconUrls = {
empty: '../assets/star-outline.svg',
half: '../assets/star-half.svg',
full: '../assets/star.svg',
};
...}
scr/app/app.module.ts:
@NgModule({
declarations: [AppComponent],
imports: [
...
NgxStarsModule,
And these exist:
scr/assets/icon.svg
scr/assets/icon-outline.svg
scr/assets/icon.svg
Could be useful to see the source code for the demo page :)
Its name suggests that this is intentional, but it would be nice to be able to update its value not just by clicking.
You can solve it that way:
ngOnChanges(changes: SimpleChanges): void {
if (changes.initialStars) {
this.rating = this.initialStars;
this.setRating(this.rating);
}
}
Hey
Getting below error for ngx-stars with 1.5.1 version on angular 12. same issue persist for lasted version which is 1.6.3. Please check
TypeError: Cannot create property 'message' on string '..ngx-stars/fesm2015/ngx-stars.mjs: This application depends upon a library published using Angular version 14.0.0, which requires Angular version 14.0.0 or newer to work correctly.
Consider upgrading your application to use a more recent version of Angular.
I am trying to reset the value of form control but its not working. please help me.
Can't able to blank the star fill after submitting the value first time...
Hi,
I can't get these stars to work in IE 11.
Im using angular 9.0.0 with tslib 1.10.0.
I've tried an upgrade with angular 9.0.4 and tslib 1.11.1.
Using the default stars it does work in other browsers:
<ngx-stars [size]="2" color="#ffc800" (ratingOutput)="setValue($event)">
However in IE im seeing yellow squares.
With IE I do see Font awesome icons correctly on other sites.
Ive tried using customStars but with that I'm seeing the yellow squares across all browsers.
Using the URLS as background=url(half-star.svg) for a diffrent div I do see the SVG images correctly in all browsers.
This confirms the css URLs provided should work.
But when I use the URLS for [customStarIcons]=object with empty half and full it will display the squares.
How can I get either of these to work in all browsers?
My customStarIcons object:
icons = {
empty: 'assets/empty-star.svg',
half: 'assets/half-star.svg',
full: 'assets/full-star.svg'
};
Edit: im using ngx-stars version 1.4.3
Size between 1 to 5 is not very adapted to all projects.
Can you let us choose the number of px instead
Hey!
How I can disable half-star selection?
I nee only a full number of the star selection
Hi.
Im trying to use it in my project, but It works only with FA version 4.x.x. With the last one 5.x.x, where we have "fas/far" classes, for the icons, it won't work.
Maybe wouldn't be bad to have an option to define what classes we want to use.
Greetings, I have run into a small problem when changing the value of the variable initialStars the component does not update the score.
I am using ngx-starts in a component of my own in which that value can change if my users change scores of some topics.
Additionally I was able to adjust the problem using switch in my html, since I can see that there is no event that captures the changes of the variable to update the stars
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.