
@Injectable() supports a scope parameter which specifies the target module. However, it's still difficult to specify that a particular service belongs in the root injector. A developer attempting to ensure that must either also provide a module intended for placement in the root injector or target a module known to already be in the root injector (e.g. BrowserModule). Both of these strategies are cumbersome and brittle. Instead, this commit adds a token APP_ROOT_SCOPE which provides a straightforward way of targeting the root injector directly, without requiring special knowledge of modules within it. PR Close #22185
23 lines
559 B
Python
23 lines
559 B
Python
package(default_visibility = ["//visibility:public"])
|
|
|
|
load("//tools:defaults.bzl", "ng_module", "ts_library")
|
|
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
|
|
|
|
ng_module(
|
|
name = "app",
|
|
srcs = glob(
|
|
[
|
|
"src/**/*.ts",
|
|
],
|
|
),
|
|
module_name = "app_built",
|
|
deps = [
|
|
"//packages/compiler-cli/integrationtest/bazel/injectable_def/lib2",
|
|
"//packages/core",
|
|
"//packages/platform-browser",
|
|
"//packages/platform-server",
|
|
"//packages/router",
|
|
"@rxjs",
|
|
],
|
|
)
|