Socket
Socket
Sign inDemoInstall

angular-url-encode

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-url-encode

A simple Angular filter to URL-encode a string.


Version published
Maintainers
1
Install size
29.1 kB
Created

Readme

Source

angular-url-encode

MIT License NPM version

:arrows_counterclockwise: A simple Angular filter to URL-encode or decode a string using encodeURI and decodeURI.

:tv: Demo

Comments and Pull Requests welcome!


Contents

Dependencies

  • AngularJS (^1.4.0)

Installation

NPM
$ npm install angular-url-encode --S
Bower
$ bower install angular-url-encode --S
Manually

Add the script and styles to your HTML:

<script src="../path/to/angular-url-encode/dist/angular-url-encode.js"></script>

Add bc.AngularUrlEncode to your module's dependencies:

angular.module('myModule', ['bc.AngularUrlEncode']);

Usage

HTML

As a filter in the DOM:

<p>{{ myPlainString | bcEncode }}</p>
<p>{{ encodedString | bcDecode }}</p>
JavaScript

Using the $filter service:

// Encode
this.encodedString = $filter('bcEncode')(this.myPlainString);

// Decode
this.decodedString = $filter('bcDecode')(this.encodedString);

Development

  • npm run build - produces production version of your library under the dist folder
  • npm run dev - produces development version of your library and runs a watcher

Keywords

FAQs

Last updated on 07 Oct 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc