30 KiB
Cheat Sheet
速查表
|
|
|---|---|
platformBrowserDynamic().bootstrapModule(AppModule); |
|
| NgModules |
|
|---|---|
|
|
|
|
|
is available to |
|
|
|
|
entryComponents: [SomeComponent, OtherComponent] |
List of components not referenced in any reachable template, for example dynamically created from code. 任何未在可达模板中引用过的组件列表,比如从代码中动态创建的。 |
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|---|---|
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|---|---|
|
Does not support parent-child relationship selectors. 但不支持指定父子关系的选择器。 |
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
class CanDeactivateGuard implements CanDeactivate<T> { |
An interface for defining a class that the router should call first to determine if it should deactivate this component after a navigation. Should return a boolean|UrlTree or an Observable/Promise that resolves to a boolean|UrlTree. |
class CanActivateChildGuard implements CanActivateChild { |
An interface for defining a class that the router should call first to determine if it should activate the child route. Should return a boolean|UrlTree or an Observable/Promise that resolves to a boolean|UrlTree. 用来定义类的接口。路由器会首先调用本接口来决定是否激活一个子路由。应该返回一个 |
|
|
|
|