Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="app">
<head>
  <script 
    src="https://code.angularjs.org/1.3.6/angular.js">
  </script>
  <script 
    src="https://code.angularjs.org/1.3.6/angular-route.js">    
  </script>
  <base href="/" />
  
  <title>Angular Route Test</title>
</head>
<body>
  <a href="test.html"> Redirect </a>
  <div ng-view> </div>
</body>
</html>
 
(function () {
  
  angular
    .module('app', ['ngRoute'])
    .config(function($routeProvider, $locationProvider) {
      $routeProvider.when('/:test*.html', { redirectTo: redirectionFunction });
      $locationProvider.html5Mode(true);
    });
  
    function redirectionFunction () {
      return 'test';
    }
    function Test($scope) {
      $scope.test = 'Test';
    }
  
  
}) ();
Output

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

Dismiss x
public
Bin info
m3kkapro
0viewers