Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

πŸ”„ A simple Angular filter to URL-encode or decode a string.

License

benjamincharity/angular-url-encode

Repository files navigation

angular-url-encode

MIT License NPM version

πŸ”„ A simple Angular filter to URL-encode or decode a string using encodeURI and decodeURI.

πŸ“Ί 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

About

πŸ”„ A simple Angular filter to URL-encode or decode a string.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /