Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyzhak/ng2-safe-img
very tiny and safe img for Angular 2
https://github.com/hyzhak/ng2-safe-img
Last synced: about 1 month ago
JSON representation
very tiny and safe img for Angular 2
- Host: GitHub
- URL: https://github.com/hyzhak/ng2-safe-img
- Owner: hyzhak
- License: mit
- Created: 2016-08-09T21:17:26.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2016-09-02T17:36:10.000Z (over 8 years ago)
- Last Synced: 2024-04-14T14:50:33.896Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 9
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-angular-components - ng2-safe-img - Very tiny and safe img for Angular 2 (Uncategorized / Uncategorized)
README
# ng2-safe-img [![Build Status](https://travis-ci.org/hyzhak/ng2-safe-img.svg?branch=develop)](https://travis-ci.org/hyzhak/ng2-safe-img)
very tiny and safe img for Angular 2Just consist from one structural directive - `*safeSrc`.
And should be used with with :```html
```# Example
Lets explain how does it work through example.
Here how should we use it
```html
```if equal to 'https://placekitten.com/200/300'
we will get```html
```if is undefined or null
we will get```html
```
so no any html elements will be there. What saves us from seeing something like this:
![unsafe img with undefined uri](unsafe-img-with-undefined-uri)