chore: remove obsolete files (#10240)
This commit is contained in:
@ -15,7 +15,6 @@ import {ComponentInstruction} from './instruction';
|
||||
// TODO(rado): find a better way to fix this, or remove if likely culprit
|
||||
// https://github.com/systemjs/systemjs/issues/487 gets closed.
|
||||
var __ignore_me = global;
|
||||
var __make_dart_analyzer_happy: Promise<any> = null;
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method `routerOnActivate`, which is called by the router at the end of a
|
||||
|
@ -1,8 +0,0 @@
|
||||
/**
|
||||
* This indirection is needed for TS compilation path.
|
||||
* See comment in lifecycle_annotations.ts.
|
||||
*/
|
||||
|
||||
library angular2.router.lifecycle_annotations;
|
||||
|
||||
export "./lifecycle_annotations_impl.dart";
|
@ -1,38 +0,0 @@
|
||||
library angular.router.route_lifecycle_reflector;
|
||||
|
||||
import 'package:angular2/src/router/lifecycle/lifecycle_annotations_impl.dart';
|
||||
import 'package:angular2/src/router/interfaces.dart';
|
||||
import 'package:angular2/src/core/reflection/reflection.dart';
|
||||
|
||||
bool hasLifecycleHook(RouteLifecycleHook e, type) {
|
||||
if (type is! Type) return false;
|
||||
|
||||
final List interfaces = reflector.interfaces(type);
|
||||
var interface;
|
||||
|
||||
if (e == routerOnActivate) {
|
||||
interface = OnActivate;
|
||||
} else if (e == routerOnDeactivate) {
|
||||
interface = OnDeactivate;
|
||||
} else if (e == routerOnReuse) {
|
||||
interface = OnReuse;
|
||||
} else if (e == routerCanDeactivate) {
|
||||
interface = CanDeactivate;
|
||||
} else if (e == routerCanReuse) {
|
||||
interface = CanReuse;
|
||||
}
|
||||
|
||||
return interfaces.contains(interface);
|
||||
}
|
||||
|
||||
Function getCanActivateHook(type) {
|
||||
final List annotations = reflector.annotations(type);
|
||||
|
||||
for (var annotation in annotations) {
|
||||
if (annotation is CanActivate) {
|
||||
return annotation.fn;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
library angular2.router.route_config_decorator;
|
||||
|
||||
export './route_config_impl.dart';
|
@ -12,8 +12,6 @@ import {RegexSerializer} from '../rules/route_paths/regex_route_path';
|
||||
|
||||
export {RouteDefinition} from '../route_definition';
|
||||
|
||||
var __make_dart_analyzer_happy: Promise<any> = null;
|
||||
|
||||
/**
|
||||
* The `RouteConfig` decorator defines routes for a given component.
|
||||
*
|
||||
|
@ -1,30 +0,0 @@
|
||||
library angular2.src.router.route_config_normalizer;
|
||||
|
||||
import "route_config_decorator.dart";
|
||||
import "../route_definition.dart";
|
||||
import "../route_registry.dart";
|
||||
import "package:angular2/src/facade/lang.dart";
|
||||
import "package:angular2/src/facade/exceptions.dart" show BaseException;
|
||||
|
||||
RouteDefinition normalizeRouteConfig(RouteDefinition config, RouteRegistry registry) {
|
||||
if (config is AsyncRoute) {
|
||||
|
||||
configRegistryAndReturnType(componentType) {
|
||||
registry.configFromComponent(componentType);
|
||||
return componentType;
|
||||
}
|
||||
|
||||
loader() {
|
||||
return config.loader().then(configRegistryAndReturnType);
|
||||
}
|
||||
return new AsyncRoute(path: config.path, loader: loader, name: config.name, data: config.data, useAsDefault: config.useAsDefault);
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
void assertComponentExists(Type component, String path) {
|
||||
if (component == null) {
|
||||
throw new BaseException(
|
||||
'Component for route "${path}" is not defined, or is not a class.');
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
library angular2.src.router.route_definition;
|
||||
|
||||
abstract class RouteDefinition {
|
||||
final String path;
|
||||
final String name;
|
||||
final bool useAsDefault;
|
||||
final String regex;
|
||||
final List<String> regex_group_names;
|
||||
final Function serializer;
|
||||
const RouteDefinition({this.path, this.name, this.useAsDefault : false, this.regex, this.regex_group_names, this.serializer});
|
||||
}
|
Reference in New Issue
Block a user