AngularJS directive to show an user avatar. Set a default avatar with initials if user has not avatar image.
See the demo page with directive working.
Download lastest release from here.
Install bower package:
bower install --save ng-default-avatar
Include the following files in your app:
<script src="bower_components/ng-default-avatar/default-avatar.js"></script>
Add, if you want, the stylesheet too:
<link rel="stylesheet" href="bower_components/ng-default-avatar/default-avatar.css">
Add ngDefaultAvatar
to your app's dependencies:
angular.module('myApplication', ['ngDefaultAvatar']);
<default-avatar name="Name" surname="Surname" image="UrlPath"></default-avatar>
User name. Default value is ?
.
User surname. Default value is an empty string.
User image. Default value is an empty string.
- Package available to install by Bower
- Add default values
- Improve files structure, directive's code and demo template
- First preview of directive with fields name, surname and image
- Demo page
Copyright (c) 2016-Present Aitor Rodríguez - Front End Factory. Directive licensed under the MIT License.