@angular-wave/angular.ts 0.0.31 → 0.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/angular-ts.esm.js +1 -1
  2. package/dist/angular-ts.umd.js +1 -1
  3. package/index.html +5 -14
  4. package/package.json +1 -1
  5. package/src/core/compile.js +5 -4
  6. package/src/core/location.js +1 -1
  7. package/src/core/parser/parse.js +1 -2
  8. package/src/core/root-scope.js +49 -99
  9. package/src/directive/events.js +2 -1
  10. package/src/directive/model.js +4 -2
  11. package/src/router/directives/state-directives.js +33 -18
  12. package/src/router/directives/view-directive.js +1 -2
  13. package/src/router/globals.js +2 -0
  14. package/src/router/index.js +23 -21
  15. package/src/router/services.js +6 -62
  16. package/src/router/state/state-queue-manager.js +2 -1
  17. package/src/router/state/state-registry.js +35 -18
  18. package/src/router/state/state-service.js +169 -1
  19. package/src/router/state/views.js +46 -2
  20. package/src/router/transition/reject-factory.js +0 -8
  21. package/src/router/transition/transition-service.js +43 -1
  22. package/src/router/url/url-config.js +7 -1
  23. package/src/router/url/url-rule.js +4 -4
  24. package/src/router/url/url-service.js +32 -15
  25. package/src/router/view/view.js +7 -51
  26. package/src/services/http.js +1 -1
  27. package/src/shared/strings.js +7 -2
  28. package/test/core/compile.spec.js +2 -2
  29. package/test/core/scope.spec.js +2 -37
  30. package/test/router/services.spec.js +7 -15
  31. package/test/router/state-directives.spec.js +2 -2
  32. package/test/router/state-filter.spec.js +0 -2
  33. package/test/router/state.spec.js +4 -4
  34. package/test/router/template-factory.spec.js +19 -10
  35. package/test/router/url-service.spec.js +4 -6
  36. package/test/router/view-directive.spec.js +9 -9
  37. package/test/router/view-hook.spec.js +10 -10
  38. package/legacy/angular-animate.js +0 -4272
  39. package/legacy/angular-aria.js +0 -426
  40. package/legacy/angular-message-format.js +0 -1072
  41. package/legacy/angular-messages.js +0 -829
  42. package/legacy/angular-route.js +0 -1266
  43. package/legacy/angular-sanitize.js +0 -891
  44. package/legacy/angular.js +0 -36600
  45. package/src/router/router.js +0 -103
  46. package/test/original-test.html +0 -33
@@ -1,103 +0,0 @@
1
- import { TransitionService } from "./transition/transition-service";
2
- import { ViewService } from "./view/view";
3
- import { StateRegistry } from "./state/state-registry";
4
- import { StateService } from "./state/state-service";
5
- import { UIRouterGlobals } from "./globals";
6
- import { UrlService } from "./url/url-service";
7
- import { trace } from "./common/trace";
8
- import { UrlRuleFactory } from "./url/url-rule";
9
- import { registerLazyLoadHook } from "./hooks/lazy-load";
10
- import { registerUpdateUrl } from "./hooks/url";
11
- import { registerActivateViews } from "./hooks/views";
12
- import { registerRedirectToHook } from "./hooks/redirect-to";
13
-
14
- /**
15
- * Router id tracker
16
- * @type {number}
17
- */
18
- let routerId = 0;
19
-
20
- /**
21
- * An instance of ng-router.
22
- * @class
23
- *
24
- * This object contains references to service APIs which define your application's routing behavior.
25
- */
26
- export class UIRouter {
27
- /**
28
- * Creates a new `UIRouter` object
29
- *
30
- * @param {angular.ILocationProvider} $locationProvider
31
- */
32
- constructor($locationProvider) {
33
- /** @type {number} */
34
- this.$id = routerId++;
35
-
36
- /** Enable/disable tracing to the javascript console */
37
- this.trace = trace;
38
- this.$locationProvider = $locationProvider;
39
-
40
- /** Provides services related to ui-view synchronization */
41
- this.viewService = new ViewService(routerId);
42
-
43
- /** @type {UIRouterGlobals} An object that contains global router state, such as the current state and params */
44
- this.globals = new UIRouterGlobals();
45
-
46
- /** @type {TransitionService} A service that exposes global Transition Hooks */
47
- this.transitionService = new TransitionService(
48
- this.globals,
49
- this.viewService,
50
- );
51
-
52
- /** @type {StateService} Provides services related to states */
53
- this.stateService = new StateService(this.globals, this.transitionService);
54
-
55
- /** Provides services related to the URL */
56
- let urlRuleFactory = new UrlRuleFactory(
57
- this.urlMatcherFactory,
58
- this.stateService,
59
- this.globals,
60
- );
61
-
62
- /**
63
- * @type {angular.UrlService}
64
- */
65
- this.urlService = new UrlService(
66
- $locationProvider,
67
- urlRuleFactory,
68
- this.stateService,
69
- );
70
-
71
- /** Provides a registry for states, and related registration services */
72
- this.stateRegistry = new StateRegistry(this.urlService);
73
-
74
- // Manual wiring ideally we would want to do this at runtime
75
- this.stateService.stateRegistry = this.stateRegistry;
76
- this.stateService.urlService = this.urlService; // <-- NOTE: circular dependency
77
-
78
- // Lazy load state trees
79
- this.transitionService._deregisterHookFns.lazyLoad = registerLazyLoadHook(
80
- this.transitionService,
81
- this.stateService,
82
- this.urlService,
83
- this.stateRegistry,
84
- );
85
-
86
- // After globals.current is updated at priority: 10000
87
- this.transitionService._deregisterHookFns.updateUrl = registerUpdateUrl(
88
- this.transitionService,
89
- this.stateService,
90
- this.urlService,
91
- );
92
-
93
- // Wire up redirectTo hook
94
- this.transitionService._deregisterHookFns.redirectTo =
95
- registerRedirectToHook(this.transitionService, this.stateService);
96
-
97
- this.transitionService._deregisterHookFns.activateViews =
98
- registerActivateViews(this.transitionService, this.viewService);
99
- this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());
100
- this.globals.$current = this.stateRegistry.root();
101
- this.globals.current = this.globals.$current.self;
102
- }
103
- }
@@ -1,33 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <script src="../legacy/angular.js"></script>
5
-
6
- <script src="//unpkg.com/@uirouter/angularjs/release/angular-ui-router.js"></script>
7
- <script>
8
- var myApp = angular.module("test", ["ng.router"]);
9
-
10
- myApp.config(function ($stateProvider) {
11
- var helloState = {
12
- name: "hello",
13
- url: "/",
14
- template: "<h3>hello world!</h3>",
15
- };
16
-
17
- var aboutState = {
18
- name: "about",
19
- url: "/about",
20
- template: "<h3>Its the UI-Router hello world app!</h3>",
21
- };
22
-
23
- $stateProvider.state(helloState);
24
- $stateProvider.state(aboutState);
25
- });
26
- </script>
27
- </head>
28
- <body ng-app="test">
29
- <a ng-sref="hello" ng-sref-active="active">Hello</a>
30
- <ng-view></ng-view>
31
- {{ 2 + 2}}
32
- </body>
33
- </html>