angular-jsuri
v0.1.0
Published
Angular dependency injection for jsUri.
Downloads
6
Readme
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:[email protected]: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