Revert "feat(router): add reuse support for angular 1.x router"
This reverts commit ddb62feae6
.
This commit is contained in:
12
modules/angular1_router/build.js
vendored
12
modules/angular1_router/build.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var ts = require('typescript');
|
||||
|
||||
@ -60,10 +58,6 @@ function main() {
|
||||
"});",
|
||||
"}));",
|
||||
"}",
|
||||
"if (constructor.$routeConfig) {",
|
||||
"constructor.annotations = constructor.annotations || [];",
|
||||
"constructor.annotations.push(new angular.annotations.RouteConfig(constructor.$routeConfig));",
|
||||
"}",
|
||||
"if (constructor.annotations) {",
|
||||
"constructor.annotations.forEach(function(annotation) {",
|
||||
"if (annotation instanceof RouteConfig) {",
|
||||
@ -76,11 +70,7 @@ function main() {
|
||||
"});",
|
||||
|
||||
"var router = new RootRouter(registry, undefined, location, new Object());",
|
||||
"$rootScope.$watch(function () { return $location.path(); }, function (path) {",
|
||||
"if (router.lastNavigationAttempt !== path) {",
|
||||
"router.navigate(path);",
|
||||
"}",
|
||||
"});",
|
||||
"$rootScope.$watch(function () { return $location.path(); }, function (path) { router.navigate(path); });",
|
||||
|
||||
"return router;"
|
||||
].join('\n'));
|
||||
|
Reference in New Issue
Block a user