Skip to content

stanleygu/sg-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Node.js Path service for angular

Use the node.js path module (check out the full documentation) in Angular.

Convenient for dealing with URLs.

Installation

  • Using bower, bower install --save stanleygu/sg-path
  • Add the module in your angular app definition:
angular.module('myApp', ['stanleygu.path']);

Example Usage

Getting repository info from Github API

angular.module('myApp')
  .controller('myCtrl', function ($scope, $http, sgPath) {
    var baseUrl = 'https://api.github.com';
    var route = 'repos';
    var user = 'angular';
    var repo = 'angular.js'
    
    $http
      .get(sgPath.join(baseUrl, route, user, repo)
      .success(function(data){
        $scope.repositoryInfo = data;
      });
  });

About

Node.js Path module for angular.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published