angular-jsuri

0.1.0 • Public • Published

angular-jsuri

Angular dependency injection for jsUri.

Installation

Install this service with bower:

bower install angular-jsuri

Angular and jsUri must be loaded prior to angular-jsuri.

Usage

var module = angular.module('app', ['angular-jsuri']);
 
module.controller('HomeController', [
  '$scope',
  'Uri',
  function($scope, Uri) {
    $scope.uri = new Uri('http://user:pass@www.test.com:81/index.html?q=books#fragment');
    $scope.uriParts = {
      protocol: uri.protocol(),    // http
      userInfo: uri.userInfo(),    // user:pass
      host: uri.host(),            // www.test.com
      port: uri.port(),            // 81
      path: uri.path(),            // /index.html
      query: uri.query(),          // q=books
      anchor: uri.anchor()         // fragment
    }
]);

License

© Dan Jarvis 2015, MIT

Readme

Keywords

none

Package Sidebar

Install

npm i angular-jsuri

Weekly Downloads

2

Version

0.1.0

License

none

Last publish

Collaborators

  • km.sec.user