Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(user): allow use base64 images for user picture #238

Merged
merged 4 commits into from
Feb 19, 2018
Merged

feat(user): allow use base64 images for user picture #238

merged 4 commits into from
Feb 19, 2018

Conversation

elupanov
Copy link
Member

Please read and mark the following check list before creating a pull request:

Short description of what this resolves:

Allows usage of base64 image as picture background in user component

@Input() picture: string;
@Input() set picture(value: string) {
this.pictureValue = value;
this.backgroundImageStyle = this.domSanitizer.bypassSecurityTrustStyle(`url(${value})`);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can do this without additional pictureValue variable,
this.backgroundImageStyle = value ? this.domSanitizer.bypassSecurityTrustStyle(url(${value})) : null;

and then in the template use this variable in if statements
Also, I would personally prefer imageBackgroundStyle instead of backgroundImageStyle .

@nnixaa nnixaa merged commit 28338a7 into akveo:master Feb 19, 2018
dimaatkaev pushed a commit to dimaatkaev/nebular that referenced this pull request Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants