Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

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

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages