Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ng2-avatar
Advanced tools
Changelog
2.3.1 (2018-04-02)
<a name="2.3.0"></a>
<a name="2.2.1"></a>
Readme
Angular Avatar (ng2-avatar) is a simple and lightweight avatar component
View all the directives in action at https://snics.github.io/ng2-avatar
Install above dependencies via npm.
Now install ng2-avatar
via:
npm install --save ng2-avatar
Note:If you are using
SystemJS
, you should adjust your configuration to point to the UMD bundle. In your systemjs config file,map
needs to tell the System loader where to look forng2-avatar
:
map: {
'ng2-avatar': 'node_modules/ng2-avatar/bundles/ng2-avatar.umd.js',
}
Once installed you need to import the main module:
import { AvatarModule } from 'ng2-avatar';
The only remaining part is to list the imported module in your application module. The exact method will be slightly
different for the root (top-level) module for which you should end up with the code similar to (notice AvatarModule.forRoot()
):
import { AvatarModule } from 'ng2-avatar';
@NgModule({
declarations: [
AppComponent,
...
],
imports: [
AvatarModule.forRoot(),
...
],
bootstrap: [AppComponent]
})
export class AppModule {
}
Other modules in your application can simply import AvatarModule
:
import { AvatarModule } from 'ng2-avatar';
@NgModule({
declarations: [OtherComponent, ...],
imports: [LibModule, ...],
})
export class OtherModule {
}
<avatar [email]="email" [displayType]="'circle'"></avatar>
<input type="email" [(ngModel)]="email">
configuration option | type | default | description |
---|---|---|---|
String | none | This email is for generated the initials letters or get the picture from Gravatar API (required) | |
name | string | none | This name is for generated the initials letters (required) |
size | number | 100 | Is the size of the image and avatar |
background | string | Random color | The background colors for the letter's avatar |
displayType | string | circle | none, circle, rounded |
letter | string | ? | These are the default letter |
defaultProtocol | string | null | specifies a protocol or uses protocol-agnostic gravatar url when empty |
Copyright (c) 2017 Nico Swiatecki. Licensed under the MIT License (MIT) - Initial work - Snics
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Angular Avatar (ng2-avatar) is a simple and lightweight avatar component
The npm package ng2-avatar receives a total of 83 weekly downloads. As such, ng2-avatar popularity was classified as not popular.
We found that ng2-avatar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.