How to use the angular-ui-router.ParamTypes function in angular-ui-router

To help you get started, we’ve selected a few angular-ui-router examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ui-router / core / test / ng1 / urlMatcherFactorySpec.js View on Github external
var module      = angular.mock.module;
var uiRouter    = require("angular-ui-router");
var Param       = uiRouter.Param;
var ParamTypes  = uiRouter.ParamTypes;
var UrlMatcher  = uiRouter.UrlMatcher;
var prop        = uiRouter.prop;
var map         = uiRouter.map;
var find        = uiRouter.find;

var provider;

function makeMatcher(url, config) {
  return new UrlMatcher(url, provider.paramTypes, config);
}

beforeEach(function() {
  var app = angular.module('ui.router.router.test', []);
  app.config(function ($urlMatcherFactoryProvider) {
    provider = $urlMatcherFactoryProvider;
    UrlMatcher = provider.UrlMatcher;