@angular-wave/angular.ts 0.6.3 → 0.6.5
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.
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/angular.spec.js +2 -2
- package/src/animations/animate-children-directive.js +1 -1
- package/src/animations/animate-css-driver.js +2 -2
- package/src/animations/animate-css.js +1 -1
- package/src/animations/animate-js.js +2 -2
- package/src/animations/animate-queue.js +2 -2
- package/src/animations/animate.js +2 -2
- package/src/animations/animate.spec.js +3 -3
- package/src/animations/animation.js +3 -3
- package/src/binding.spec.js +1 -1
- package/src/core/cache/cache.js +1 -1
- package/src/core/compile/attributes.js +24 -7
- package/src/core/compile/compile.js +79 -249
- package/src/core/compile/compile.md +0 -8
- package/src/core/compile/compile.spec.js +38 -640
- package/src/core/controller/controller.js +2 -2
- package/src/core/di/injector.js +1 -1
- package/src/core/di/injector.spec.js +1 -1
- package/src/core/di/internal-injector.js +2 -2
- package/src/core/di/ng-module.js +1 -1
- package/src/core/filter/filter.js +2 -2
- package/src/core/interpolate/interpolate.js +1 -1
- package/src/core/interval/interval-factory.js +1 -1
- package/src/core/interval/interval.js +1 -1
- package/src/core/location/location.js +3 -3
- package/src/core/on.spec.js +1 -1
- package/src/core/parse/interpreter.js +1 -1
- package/src/core/prop.spec.js +2 -2
- package/src/core/q/q.js +2 -2
- package/src/core/root-element.spec.js +1 -1
- package/src/core/sanitize/sanitize-uri.js +1 -1
- package/src/core/sce/sce.js +3 -3
- package/src/core/sce/sce.spec.js +1 -1
- package/src/core/scope/scope.js +3 -3
- package/src/core/scope/scope.spec.js +1 -1
- package/src/core/timeout/timeout.js +2 -2
- package/src/core/url-utils/url-utils.js +1 -1
- package/src/directive/aria/aria.js +1 -1
- package/src/directive/aria/aria.spec.js +1 -1
- package/src/directive/attrs/attrs.js +3 -3
- package/src/directive/attrs/attrs.spec.js +1 -1
- package/src/directive/attrs/boolean.spec.js +1 -1
- package/src/directive/attrs/element-style.spec.js +1 -1
- package/src/directive/attrs/src.spec.js +1 -1
- package/src/directive/bind/bind.js +1 -1
- package/src/directive/bind/bind.spec.js +1 -1
- package/src/directive/bind/bing-html.spec.js +1 -1
- package/src/directive/change/change.spec.js +1 -1
- package/src/directive/channel/channel.js +25 -7
- package/src/directive/channel/channel.spec.js +17 -0
- package/src/directive/class/class.js +1 -1
- package/src/directive/class/class.spec.js +2 -2
- package/src/directive/cloak/cloak.spec.js +1 -1
- package/src/directive/controller/controller.spec.js +2 -2
- package/src/directive/events/click.spec.js +1 -1
- package/src/directive/events/event.spec.js +1 -1
- package/src/directive/events/events.js +3 -3
- package/src/directive/form/form.js +2 -2
- package/src/directive/form/form.spec.js +1 -1
- package/src/directive/if/if.js +2 -3
- package/src/directive/if/if.md +0 -1
- package/src/directive/if/if.spec.js +2 -2
- package/src/directive/include/include.js +3 -3
- package/src/directive/include/include.spec.js +2 -2
- package/src/directive/init/init.spec.js +1 -1
- package/src/directive/input/input.js +1 -1
- package/src/directive/input/input.spec.js +1 -1
- package/src/directive/messages/messages.js +1 -1
- package/src/directive/messages/messages.spec.js +3 -3
- package/src/directive/model/model.js +7 -7
- package/src/directive/model/model.spec.js +2 -2
- package/src/directive/model-options/model-options.js +1 -1
- package/src/directive/model-options/model-options.spec.js +2 -2
- package/src/directive/non-bindable/non-bindable.spec.js +1 -1
- package/src/directive/observe/observe.spec.js +1 -1
- package/src/directive/options/options.js +6 -2
- package/src/directive/options/options.spec.js +2 -2
- package/src/directive/ref/href.spec.js +2 -2
- package/src/directive/ref/ref.js +1 -1
- package/src/directive/repeat/repeat.js +263 -255
- package/src/directive/repeat/repeat.md +0 -22
- package/src/directive/repeat/repeat.spec.js +2 -115
- package/src/directive/script/script.spec.js +1 -1
- package/src/directive/select/select.js +2 -2
- package/src/directive/select/select.spec.js +2 -2
- package/src/directive/show-hide/show-hide.js +1 -3
- package/src/directive/show-hide/show-hide.md +0 -2
- package/src/directive/show-hide/show-hide.spec.js +1 -1
- package/src/directive/style/style.spec.js +1 -1
- package/src/directive/switch/switch.js +2 -4
- package/src/directive/switch/switch.spec.js +1 -51
- package/src/directive/transclude/transclude.js +2 -2
- package/src/directive/validators/validators.js +2 -2
- package/src/directive/validators/validators.spec.js +1 -1
- package/src/filters/filter.js +1 -1
- package/src/filters/filter.spec.js +2 -2
- package/src/filters/filters.js +1 -1
- package/src/filters/filters.spec.js +1 -1
- package/src/filters/limit-to.js +1 -1
- package/src/filters/limit-to.spec.js +1 -1
- package/src/filters/order-by.js +1 -1
- package/src/index.js +3 -9
- package/src/loader.js +12 -16
- package/src/router/common/coreservices.js +1 -1
- package/src/router/common/trace.js +1 -1
- package/src/router/directives/state-directives.js +1 -1
- package/src/router/directives/state-directives.spec.js +1 -1
- package/src/router/directives/view-directive.js +2 -2
- package/src/router/directives/view-directive.spec.js +1 -1
- package/src/router/hooks/redirect-to.js +1 -1
- package/src/router/params/param-type.js +1 -1
- package/src/router/params/param-types.js +1 -1
- package/src/router/params/param.js +1 -1
- package/src/router/resolve/resolvable.js +1 -1
- package/src/router/resolve/resolve-context.js +1 -1
- package/src/router/state/state-builder.js +1 -1
- package/src/router/state/state-matcher.js +1 -1
- package/src/router/state/state-object.js +1 -1
- package/src/router/state/state-queue-manager.js +1 -1
- package/src/router/state/state-registry.js +2 -2
- package/src/router/state/state-service.js +1 -1
- package/src/router/state/state.spec.js +2 -2
- package/src/router/state/target-state.js +1 -1
- package/src/router/state/views.js +1 -1
- package/src/router/state-provider.js +1 -1
- package/src/router/template-factory.js +9 -8
- package/src/router/template-factory.spec.js +1 -1
- package/src/router/transition/hook-registry.js +1 -1
- package/src/router/transition/transition-service.js +1 -1
- package/src/router/transition/transition.js +1 -1
- package/src/router/url/url-config.js +1 -1
- package/src/router/url/url-matcher.js +2 -2
- package/src/router/url/url-rule.js +1 -1
- package/src/router/url/url-rules.js +1 -1
- package/src/router/url/url-service.js +6 -1
- package/src/router/url/url-service.spec.js +1 -1
- package/src/router/view/view.spec.js +1 -1
- package/src/router/view-hook.spec.js +1 -1
- package/src/router/view-scroll.spec.js +1 -1
- package/src/services/anchor-scroll.js +1 -1
- package/src/services/browser.js +2 -2
- package/src/services/cookie-reader.js +1 -1
- package/src/services/http/http.js +3 -3
- package/src/services/http/http.spec.js +1 -1
- package/src/services/http-backend/http-backend.js +1 -1
- package/src/services/log.js +1 -1
- package/src/services/template-request.js +2 -2
- package/src/shared/common.js +1 -1
- package/src/shared/jqlite/jqlite.js +9 -9
- package/src/shared/jqlite/jqlite.spec.js +11 -11
- package/src/shared/min-err.spec.js +6 -1
- package/src/shared/predicates.js +1 -1
- package/src/shared/strings.js +1 -1
- package/src/shared/test-utils.js +1 -1
- package/src/shared/utils.js +1 -1
- package/src/shared/utils.spec.js +1 -1
- package/src/types.js +0 -2
- package/types/animations/animate-css-driver.d.ts +1 -1
- package/types/animations/animate-js.d.ts +1 -1
- package/types/animations/animate.d.ts +1 -1
- package/types/animations/animation.d.ts +1 -1
- package/types/core/cache/cache.d.ts +1 -1
- package/types/core/compile/attributes.d.ts +2 -2
- package/types/core/compile/compile.d.ts +3 -2
- package/types/core/controller/controller.d.ts +1 -1
- package/types/core/filter/filter.d.ts +1 -1
- package/types/core/location/location.d.ts +1 -1
- package/types/core/q/q.d.ts +1 -1
- package/types/core/sce/sce.d.ts +1 -1
- package/types/core/scope/scope.d.ts +1 -1
- package/types/core/timeout/timeout.d.ts +1 -1
- package/types/directive/channel/channel.d.ts +13 -4
- package/types/directive/model/model.d.ts +9 -9
- package/types/directive/repeat/repeat.d.ts +10 -8
- package/types/loader.d.ts +5 -6
- package/types/router/common/coreservices.d.ts +1 -1
- package/types/router/state/state-registry.d.ts +2 -2
- package/types/router/template-factory.d.ts +2 -2
- package/types/services/browser.d.ts +1 -1
- package/types/services/http/http.d.ts +1 -1
- package/types/services/template-request.d.ts +1 -1
- package/types/shared/jqlite/jqlite.d.ts +1 -1
- package/types/shared/test-utils.d.ts +1 -1
- package/types/types.d.ts +1 -5
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
isObject,
|
|
6
6
|
isString,
|
|
7
7
|
isFunction,
|
|
8
|
-
} from "../../shared/utils";
|
|
8
|
+
} from "../../shared/utils.js";
|
|
9
9
|
|
|
10
10
|
const $controllerMinErr = minErr("$controller");
|
|
11
11
|
|
|
@@ -66,7 +66,7 @@ export class ControllerProvider {
|
|
|
66
66
|
/**
|
|
67
67
|
* $get method for dependency injection.
|
|
68
68
|
*
|
|
69
|
-
* @param {import("../../core/di/internal-injector").InjectorService} $injector
|
|
69
|
+
* @param {import("../../core/di/internal-injector.js").InjectorService} $injector
|
|
70
70
|
* @returns {Function} A service function that creates controllers.
|
|
71
71
|
*/
|
|
72
72
|
$get = [
|
package/src/core/di/injector.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector, annotate } from "./injector";
|
|
3
|
-
import { valueFn, extend } from "../../shared/utils";
|
|
3
|
+
import { valueFn, extend } from "../../shared/utils.js";
|
|
4
4
|
|
|
5
5
|
describe("injector.modules", () => {
|
|
6
6
|
beforeEach(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { assertArgFn, minErr } from "../../shared/utils";
|
|
2
|
-
import { INJECTOR_LITERAL } from "./ng-module";
|
|
1
|
+
import { assertArgFn, minErr } from "../../shared/utils.js";
|
|
2
|
+
import { INJECTOR_LITERAL } from "./ng-module.js";
|
|
3
3
|
|
|
4
4
|
const ARROW_ARG = /^([^(]+?)=>/;
|
|
5
5
|
const FN_ARGS = /^[^(]*\(\s*([^)]*)\)/m;
|
package/src/core/di/ng-module.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isObject } from "../../shared/utils";
|
|
1
|
+
import { isObject } from "../../shared/utils.js";
|
|
2
2
|
import { filterFilter } from "../../filters/filter";
|
|
3
3
|
import { jsonFilter } from "../../filters/filters";
|
|
4
4
|
import { limitToFilter } from "../../filters/limit-to";
|
|
@@ -28,7 +28,7 @@ export function FilterProvider($provide) {
|
|
|
28
28
|
"$injector",
|
|
29
29
|
/**
|
|
30
30
|
*
|
|
31
|
-
* @param {import("../../core/di/internal-injector").InjectorService} $injector
|
|
31
|
+
* @param {import("../../core/di/internal-injector.js").InjectorService} $injector
|
|
32
32
|
* @returns
|
|
33
33
|
*/
|
|
34
34
|
function ($injector) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JQLite } from "../../shared/jqlite/jqlite";
|
|
1
|
+
import { JQLite } from "../../shared/jqlite/jqlite.js";
|
|
2
2
|
import { urlResolve } from "../url-utils/url-utils";
|
|
3
3
|
import {
|
|
4
4
|
encodeUriSegment,
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
parseKeyValue,
|
|
13
13
|
toInt,
|
|
14
14
|
toKeyValue,
|
|
15
|
-
} from "../../shared/utils";
|
|
16
|
-
import { ScopePhase } from "../scope/scope";
|
|
15
|
+
} from "../../shared/utils.js";
|
|
16
|
+
import { ScopePhase } from "../scope/scope.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @typedef {Object} DefaultPorts
|
package/src/core/on.spec.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Angular } from "../loader";
|
|
2
2
|
import { createInjector } from "./di/injector";
|
|
3
|
-
import { valueFn } from "../shared/utils";
|
|
3
|
+
import { valueFn } from "../shared/utils.js";
|
|
4
4
|
|
|
5
5
|
describe("ngOn* event binding", () => {
|
|
6
6
|
let $rootScope, module, injector, $compile;
|
package/src/core/prop.spec.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Angular } from "../loader";
|
|
2
2
|
import { createInjector } from "./di/injector";
|
|
3
|
-
import { valueFn } from "../shared/utils";
|
|
4
|
-
import { dealoc } from "../shared/jqlite/jqlite";
|
|
3
|
+
import { valueFn } from "../shared/utils.js";
|
|
4
|
+
import { dealoc } from "../shared/jqlite/jqlite.js";
|
|
5
5
|
|
|
6
6
|
describe("ngProp*", () => {
|
|
7
7
|
let $compile, $rootScope, compileProvider, $sce;
|
package/src/core/q/q.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
isError,
|
|
8
8
|
toDebugString,
|
|
9
9
|
isPromiseLike,
|
|
10
|
-
} from "../../shared/utils";
|
|
10
|
+
} from "../../shared/utils.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {Object} QService
|
|
@@ -65,7 +65,7 @@ export class $QProvider {
|
|
|
65
65
|
/**
|
|
66
66
|
*
|
|
67
67
|
* @param {import('../scope/scope').Scope} $rootScope
|
|
68
|
-
* @param {import(
|
|
68
|
+
* @param {import("../exception-handler.js").ErrorHandler} $exceptionHandler
|
|
69
69
|
* @returns
|
|
70
70
|
*/
|
|
71
71
|
function ($rootScope, $exceptionHandler) {
|
package/src/core/sce/sce.js
CHANGED
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
lowercase,
|
|
12
12
|
minErr,
|
|
13
13
|
shallowCopy,
|
|
14
|
-
} from "../../shared/utils";
|
|
14
|
+
} from "../../shared/utils.js";
|
|
15
15
|
|
|
16
|
-
import { snakeToCamel } from "../../shared/jqlite/jqlite";
|
|
16
|
+
import { snakeToCamel } from "../../shared/jqlite/jqlite.js";
|
|
17
17
|
|
|
18
18
|
const $sceMinErr = minErr("$sce");
|
|
19
19
|
|
|
@@ -230,7 +230,7 @@ export function SceDelegateProvider() {
|
|
|
230
230
|
"$$sanitizeUri",
|
|
231
231
|
/**
|
|
232
232
|
*
|
|
233
|
-
* @param {import("../../core/di/internal-injector").InjectorService} $injector
|
|
233
|
+
* @param {import("../../core/di/internal-injector.js").InjectorService} $injector
|
|
234
234
|
* @param {*} $$sanitizeUri
|
|
235
235
|
* @returns
|
|
236
236
|
*/
|
package/src/core/sce/sce.spec.js
CHANGED
package/src/core/scope/scope.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isNumberNaN,
|
|
10
10
|
arrayRemove,
|
|
11
11
|
equals,
|
|
12
|
-
} from "../../shared/utils";
|
|
12
|
+
} from "../../shared/utils.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @enum {number}
|
|
@@ -72,7 +72,7 @@ let applyAsyncId = null;
|
|
|
72
72
|
let $parse;
|
|
73
73
|
/** @type {import('../../services/browser').Browser} */
|
|
74
74
|
let $browser;
|
|
75
|
-
/**@type {import(
|
|
75
|
+
/**@type {import("../exception-handler.js").ErrorHandler} */
|
|
76
76
|
let $exceptionHandler;
|
|
77
77
|
|
|
78
78
|
/**
|
|
@@ -96,7 +96,7 @@ export class RootScopeProvider {
|
|
|
96
96
|
"$parse",
|
|
97
97
|
"$browser",
|
|
98
98
|
/**
|
|
99
|
-
* @param {import(
|
|
99
|
+
* @param {import("../exception-handler.js").ErrorHandler} exceptionHandler
|
|
100
100
|
* @param {import('../parse/parse').ParseService} parse
|
|
101
101
|
* @param {import('../../services/browser').Browser} browser
|
|
102
102
|
* @returns {Scope} root scope
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { markQExceptionHandled } from "../q/q";
|
|
2
|
-
import { isDefined, minErr, sliceArgs } from "../../shared/utils";
|
|
2
|
+
import { isDefined, minErr, sliceArgs } from "../../shared/utils.js";
|
|
3
3
|
|
|
4
4
|
const $timeoutMinErr = minErr("$timeout");
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ export class TimeoutProvider {
|
|
|
14
14
|
* @param {import('../scope/scope').Scope} $rootScope
|
|
15
15
|
* @param {import('../../services/browser').Browser} $browser
|
|
16
16
|
* @param {*} $q
|
|
17
|
-
* @param {import(
|
|
17
|
+
* @param {import("../exception-handler.js").ErrorHandler} $exceptionHandler
|
|
18
18
|
* @returns
|
|
19
19
|
*/
|
|
20
20
|
($rootScope, $browser, $q, $exceptionHandler) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BOOLEAN_ATTR } from "../../shared/jqlite/jqlite";
|
|
2
|
-
import { directiveNormalize } from "../../shared/utils";
|
|
3
|
-
import { ALIASED_ATTR } from "../../shared/constants";
|
|
1
|
+
import { BOOLEAN_ATTR } from "../../shared/jqlite/jqlite.js";
|
|
2
|
+
import { directiveNormalize } from "../../shared/utils.js";
|
|
3
|
+
import { ALIASED_ATTR } from "../../shared/constants.js";
|
|
4
4
|
|
|
5
5
|
export const REGEX_STRING_REGEXP = /^\/(.+)\/([a-z]*)$/;
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../core/di/injector";
|
|
3
|
-
import { dealoc } from "../../shared/jqlite/jqlite";
|
|
3
|
+
import { dealoc } from "../../shared/jqlite/jqlite.js";
|
|
4
4
|
|
|
5
5
|
describe("boolean attr directives", () => {
|
|
6
6
|
let element, $rootScope, $compile, $rootElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../core/di/injector";
|
|
3
|
-
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
3
|
+
import { dealoc, JQLite } from "../../shared/jqlite/jqlite.js";
|
|
4
4
|
|
|
5
5
|
describe("style", () => {
|
|
6
6
|
let $rootScope;
|
|
@@ -1,24 +1,42 @@
|
|
|
1
|
-
import { EventBus } from "../../core/pubsub/pubsub";
|
|
1
|
+
import { EventBus } from "../../core/pubsub/pubsub.js";
|
|
2
|
+
import { isObject } from "../../shared/utils.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Dynamically updates an element's content based on events published on a specified channel.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
6
|
+
* If data is sent via `EventBus` on the specified `ngChannel`, the directive attempts to update the element's content accordingly,
|
|
7
|
+
* either by directly setting the inner HTML or merging the scope's data if the element contains a template.
|
|
8
|
+
*
|
|
9
|
+
* If the element has a template and incoming data is an object, the directive will merge all key/value pairs onto the scope,
|
|
10
|
+
* allowing Angular expressions (`{{ yourModel }}`) to be evaluated and rendered.
|
|
7
11
|
*
|
|
8
12
|
* When the scope is destroyed, the directive automatically unsubscribes from the channel.
|
|
13
|
+
* Example:
|
|
14
|
+
*
|
|
15
|
+
* HTML:
|
|
16
|
+
* <div ng-channel="userChannel">Hello {{ user.firstName }} {{ user.lastName }}</div>
|
|
9
17
|
*
|
|
18
|
+
* JavaScript:
|
|
19
|
+
* angular.EventBus.publish('userChannel', { user: { firstName: 'John', lastName: 'Smith' } });
|
|
10
20
|
*
|
|
11
|
-
* @returns {import("../../types").Directive}
|
|
21
|
+
* @returns {import("../../types.js").Directive}
|
|
12
22
|
*/
|
|
13
23
|
export function ngChannelDirective() {
|
|
14
24
|
return {
|
|
15
25
|
restrict: "EA",
|
|
16
26
|
link: (scope, element, attrs) => {
|
|
17
|
-
const
|
|
27
|
+
const hasTemplate = element[0].childNodes.length > 0;
|
|
18
28
|
const channel = attrs["ngChannel"];
|
|
19
29
|
|
|
20
|
-
const key = EventBus.subscribe(channel, (val) => {
|
|
21
|
-
|
|
30
|
+
const key = EventBus.subscribe(channel, async (val) => {
|
|
31
|
+
if (!hasTemplate) {
|
|
32
|
+
element[0].innerHTML = val;
|
|
33
|
+
} else {
|
|
34
|
+
if (isObject(val)) {
|
|
35
|
+
Object.entries(val).forEach(([key, value]) => {
|
|
36
|
+
scope[key] = value;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
22
40
|
});
|
|
23
41
|
|
|
24
42
|
scope.$on("$destroy", () => {
|
|
@@ -49,4 +49,21 @@ describe("channel", () => {
|
|
|
49
49
|
|
|
50
50
|
expect(unsubscribeSpy).toHaveBeenCalled();
|
|
51
51
|
});
|
|
52
|
+
|
|
53
|
+
it("should handle templates when EventBus emits a value", async () => {
|
|
54
|
+
element = $compile(
|
|
55
|
+
'<div ng-channel="testChannel">{{ a.firstName }} {{ a.lastName }}</div>',
|
|
56
|
+
)($scope);
|
|
57
|
+
$scope.$digest();
|
|
58
|
+
expect(element[0].textContent).toBe(" ");
|
|
59
|
+
|
|
60
|
+
EventBus.publish("testChannel", {
|
|
61
|
+
a: { firstName: "John", lastName: "Doe" },
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
await wait(100);
|
|
65
|
+
$scope.$digest();
|
|
66
|
+
|
|
67
|
+
expect(element[0].textContent).toBe("John Doe");
|
|
68
|
+
});
|
|
52
69
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
1
|
+
import { dealoc, JQLite } from "../../shared/jqlite/jqlite.js";
|
|
2
2
|
import { Angular } from "../../loader";
|
|
3
|
-
import { valueFn } from "../../shared/utils";
|
|
3
|
+
import { valueFn } from "../../shared/utils.js";
|
|
4
4
|
|
|
5
5
|
describe("ngClass", () => {
|
|
6
6
|
let element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Angular } from "../../loader";
|
|
2
2
|
import { createInjector } from "../../core/di/injector";
|
|
3
|
-
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
4
|
-
import { bind } from "../../shared/utils";
|
|
3
|
+
import { dealoc, JQLite } from "../../shared/jqlite/jqlite.js";
|
|
4
|
+
import { bind } from "../../shared/utils.js";
|
|
5
5
|
|
|
6
6
|
describe("ngController", () => {
|
|
7
7
|
let angular;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { directiveNormalize } from "../../shared/utils";
|
|
2
|
-
import { ScopePhase } from "../../core/scope/scope";
|
|
1
|
+
import { directiveNormalize } from "../../shared/utils.js";
|
|
2
|
+
import { ScopePhase } from "../../core/scope/scope.js";
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
* A collection of directives that allows creation of custom event handlers that are defined as
|
|
@@ -27,7 +27,7 @@ const forceAsyncEvents = {
|
|
|
27
27
|
*
|
|
28
28
|
* @param {*} $parse
|
|
29
29
|
* @param {*} $rootScope
|
|
30
|
-
* @param {import('../../core/exception-handler').ErrorHandler} $exceptionHandler
|
|
30
|
+
* @param {import('../../core/exception-handler.js').ErrorHandler} $exceptionHandler
|
|
31
31
|
* @returns
|
|
32
32
|
*/
|
|
33
33
|
($parse, $rootScope, $exceptionHandler) => {
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
snakeCase,
|
|
8
8
|
extend,
|
|
9
9
|
isUndefined,
|
|
10
|
-
} from "../../shared/utils";
|
|
10
|
+
} from "../../shared/utils.js";
|
|
11
11
|
import {
|
|
12
12
|
PRISTINE_CLASS,
|
|
13
13
|
DIRTY_CLASS,
|
|
14
14
|
VALID_CLASS,
|
|
15
15
|
INVALID_CLASS,
|
|
16
|
-
} from "../../shared/constants";
|
|
16
|
+
} from "../../shared/constants.js";
|
|
17
17
|
|
|
18
18
|
export const nullFormCtrl = {
|
|
19
19
|
$addControl: () => {},
|
package/src/directive/if/if.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { domInsert } from "../../animations/animate";
|
|
2
|
-
import { getBlockNodes } from "../../shared/jqlite/jqlite";
|
|
3
|
-
import { hasAnimate } from "../../shared/utils";
|
|
2
|
+
import { getBlockNodes } from "../../shared/jqlite/jqlite.js";
|
|
3
|
+
import { hasAnimate } from "../../shared/utils.js";
|
|
4
4
|
|
|
5
5
|
ngIfDirective.$inject = ["$animate"];
|
|
6
6
|
/**
|
|
@@ -11,7 +11,6 @@ ngIfDirective.$inject = ["$animate"];
|
|
|
11
11
|
*/
|
|
12
12
|
export function ngIfDirective($animate) {
|
|
13
13
|
return {
|
|
14
|
-
multiElement: true,
|
|
15
14
|
transclude: "element",
|
|
16
15
|
priority: 600,
|
|
17
16
|
terminal: true,
|
package/src/directive/if/if.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
2
|
-
import { valueFn } from "../../shared/utils";
|
|
1
|
+
import { dealoc, JQLite } from "../../shared/jqlite/jqlite.js";
|
|
2
|
+
import { valueFn } from "../../shared/utils.js";
|
|
3
3
|
import { Angular } from "../../loader";
|
|
4
4
|
import { wait } from "../../shared/test-utils";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isDefined } from "../../shared/utils";
|
|
2
|
-
import { buildFragment } from "../../shared/jqlite/jqlite";
|
|
3
|
-
import { hasAnimate } from "../../shared/utils";
|
|
1
|
+
import { isDefined } from "../../shared/utils.js";
|
|
2
|
+
import { buildFragment } from "../../shared/jqlite/jqlite.js";
|
|
3
|
+
import { hasAnimate } from "../../shared/utils.js";
|
|
4
4
|
import { domInsert } from "../../animations/animate";
|
|
5
5
|
|
|
6
6
|
export const ngIncludeDirective = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
|
|
1
|
+
import { dealoc, JQLite } from "../../shared/jqlite/jqlite.js";
|
|
2
2
|
import { Angular } from "../../loader";
|
|
3
3
|
import { createInjector } from "../../core/di/injector";
|
|
4
|
-
import { valueFn } from "../../shared/utils";
|
|
4
|
+
import { valueFn } from "../../shared/utils.js";
|
|
5
5
|
import { wait } from "../../shared/test-utils";
|
|
6
6
|
|
|
7
7
|
describe("ngInclude", () => {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
timezoneToOffset,
|
|
14
14
|
nextUid,
|
|
15
15
|
equals,
|
|
16
|
-
} from "../../shared/utils";
|
|
16
|
+
} from "../../shared/utils.js";
|
|
17
17
|
import { ngModelMinErr } from "./../model/model";
|
|
18
18
|
|
|
19
19
|
// Regex code was initially obtained from SO prior to modification: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231
|