Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-app="app">
  <div ng-controller="firstCtrl">
  a:{{a}}
  b:{{b}}
      </div>
</body>
</html>
 
var app = angular.module('app', []);
function getParameterByName(name, string) {
    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
        results = regex.exec(string);
    return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
app.controller('firstCtrl', function($scope){
 
 var stringa="/api/project/?currentuser=false&page=2";
 var stringb="/api/project/?page=2";
 
 $scope.a = getParameterByName('page', stringa);
 $scope.b = getParameterByName('page', stringb);
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
zieemerpro
0viewers