小编sha*_*nda的帖子

包'@ angular / cli'不是依赖项

尝试运行命令时出现以下错误

ng update @angular/cli @angular/core --allow-dirty

Repository is not clean.  Update changes will be mixed with pre-existing changes.
Using package manager: 'npm'
Collecting installed dependencies...
Found 28 dependencies.
Package '@angular/cli' is not a dependency.
Run Code Online (Sandbox Code Playgroud)

angular-cli angular

6
推荐指数
5
解决办法
2517
查看次数

发现重复类 com.google.android.gms.location.places.zza

这些是我在清单文件中的依赖项


    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.android.gms:play-services:11.4.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.firebase:firebase-firestore:18.0.0'
    implementation "com.google.android.libraries.places:places:1.1.0"


Run Code Online (Sandbox Code Playgroud)

我收到错误

Duplicate class com.google.android.gms.location.places.zza found in modules classes.jar (com.google.android.gms:play-services-places-placereport:16.0.0) and classes.jar (com.google.android.gms:play-services-places:11.4.0)

Go to the documentation to learn how to Fix dependency resolution errors.
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题?

dependencies android manifest firebase google-cloud-firestore

5
推荐指数
1
解决办法
6574
查看次数

如何更改 Angular 中的辅助路由?

这是我的app.routing.module.ts文件

  { path: 'admin', component: AdminComponent,
    children: [
      { path: 'driverregister',outlet: 'adminnavbar', component: RegisterdriverComponent},
      { path: 'viewdrivers',outlet: 'adminnavbar', component: ViewdriversComponent},
      { path: 'editdriverdetails',outlet: 'adminnavbar', component: EditdriverdetailsComponent},
    ]
  },
Run Code Online (Sandbox Code Playgroud)

单击以下路由器链接后

[routerLink]="[{outlets: {'adminnavbar': 'driverregister'}}]"

我的网址显示为

http://localhost:4200/admin/(adminnavbar:viewdrivers)

现在我想将我的网址更改为

http://localhost:4200/admin/(adminnavbar:editdriverdetails)

我尝试使用

[routerLink]="[{outlets: {'adminnavbar': 'editdriverdetails'}}]"

但它没有奏效。它在控制台中显示以下错误。

Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'admin' Error: Cannot match any routes. URL Segment: 'admin'

如何解决这个问题?

routes angular

1
推荐指数
1
解决办法
335
查看次数

如何设置 mat-icon 和按钮标题之间的填充

<button mat-raised-button color="warn">
     <mat-icon>delete</mat-icon>
     Remove Driver
</button>
Run Code Online (Sandbox Code Playgroud)

如何在标题mat-iconbutton标题之间添加填充?

我想将按钮标题保留在按钮的中间,并将图标保留在左上角。

css angular-material angular

1
推荐指数
1
解决办法
1万
查看次数