我应该如何配置新的Angular 8视图子级?
@ViewChild('searchText', {read: ElementRef, static: false})
public searchTextInput: ElementRef;
Run Code Online (Sandbox Code Playgroud)
与
@ViewChild('searchText', {read: ElementRef, static: true})
public searchTextInput: ElementRef;
Run Code Online (Sandbox Code Playgroud)
哪个更好?什么时候应该使用static:truevs static:false?
我收到以下错误(转储MongoDB 3.2)(恢复MongoDB 3.4):
Failed: ngivr-dev.ledgerhelpers: error creating indexes for ngivr-dev.ledgerhelpers: **createIndex error:** **The field 'safe' is not valid for an index specification.** Specification: **{ unique: true, name: "ledgerId_1", safe: null, ns: "ngivr-dev.ledgerhelpers", background: true, key: { ledgerId: 1 } }**
Run Code Online (Sandbox Code Playgroud)
看起来安全索引为null.但是我如何在MongoDB 3.4中使用它?3.2没关系.
git是什么意思,"无法将对象迁移到永久存储"?
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 956 bytes | 0 bytes/s, done.
Total 4 (delta 2), reused 0 (delta 0)
error: failed to push some refs to 'https://git.patrikx3.tk/server-scripts.git'
To https://git.patrikx3.tk/server-scripts.git
! refs/heads/master:refs/heads/master [remote rejected] (unable to migrate objects to permanent storage)
Done
Run Code Online (Sandbox Code Playgroud) @angular 常春藤问题
当我使用 ng cli 时,它将模块编译为 esm2015,我的问题是我有一个旧系统,因为 angular 2 次,我使用 webpack,但对我来说它编译为 es5。
如何更改它以编译为 esm2015?
我的 tsconfig.aot.json:
{
"compilerOptions": {
"rootDir": ".",
"baseUrl": ".",
"skipLibCheck": true,
"outDir": "build/aot",
"target": "es2015",
"module": "esnext",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"lib": [
"es2018",
"dom"
],
"paths": {
"corifeus-web-material": [
"build-modules/corifeus-web-material/index.ts"
],
"corifeus-web": [
"build-modules/corifeus-web/index.ts"
],
"corifeus-web-material/*": [
"build-modules/corifeus-web-material/*"
],
"corifeus-web/*": [
"build-modules/corifeus-web/*"
]
}
},
"include": [
"build-modules/**/*",
"src/angular/**/*",
"test/angular-webpack/**/*"
],
"exclude": [
"src-save",
"*.worker.js", …Run Code Online (Sandbox Code Playgroud) 在Angular 1 Material中我可以使用一个指令,现在它是一个属性,现在很难做到.我怎么能这样做只是为了只显示工具提示,就像页面宽度小,隐藏什么时候大?
我找不到.它不可能像以下一样使用:
<md-tooltip ngIf="false">sometimes hidden</md-tooltip>
Run Code Online (Sandbox Code Playgroud) 在paletta中,我可以看到对比.如何选择对比色?
作品:
scss
mat-color($button-primary);
Run Code Online (Sandbox Code Playgroud)
不工作
scss
mat-color($button-primary, contrast(900));
Run Code Online (Sandbox Code Playgroud)
在底部看它说对比.
scss
$mat-red: (
50: #ffebee,
100: #ffcdd2,
200: #ef9a9a,
300: #e57373,
400: #ef5350,
500: #f44336,
600: #e53935,
700: #d32f2f,
800: #c62828,
900: #b71c1c,
A100: #ff8a80,
A200: #ff5252,
A400: #ff1744,
A700: #d50000,
contrast: (
50: $black-87-opacity,
100: $black-87-opacity,
200: $black-87-opacity,
300: $black-87-opacity,
400: $black-87-opacity,
500: white,
600: white,
700: white,
800: $white-87-opacity,
900: $white-87-opacity,
A100: $black-87-opacity,
A200: white,
A400: white,
A700: white,
)
);
Run Code Online (Sandbox Code Playgroud)
我该如何使用对比度?
angular ×3
angular-cli ×1
angular8 ×1
git ×1
git-push ×1
mongodb ×1
mongodump ×1
mongorestore ×1
tooltip ×1
typescript ×1
viewchild ×1