小编Dre*_*208的帖子

无法绑定到'routerLink',因为它不是'a'的已知属性.("<header id ="header">

以前曾经问过,我做了所有建议的评论,但似乎都没有.我有一个问题的组合.让wallaby.js使用我的项目并在运行时找出错误ng test.

Can't bind to 'routerLink' since it isn't a known property of 'a'. ("<header id="header">                                                                                         <h1 id="logo">                                                                                                                                                                    <a [ERROR ->][routerLink]="['/home']"></a>                                                                                                        
                </h1>
        "): AppComponent@2:5
        Can't bind to 'routerLink' since it isn't a known property of 'a'. ("
                <div id="menu">
                        <a [ERROR ->][routerLink]="['/home']" class="btn">Home</a>
                        <a [routerLink]="['/about']" class="btn">About</a>
                        "): AppComponent@6:5
        Can't bind to 'routerLink' since it isn't a known property of 'a'. ("
                <div id="menu">
                        <a [routerLink]="['/home']" class="btn">Home</a>
                        <a [ERROR ->][routerLink]="['/about']" class="btn">About</a>
                        <a [routerLink]="['/experiments']" class="btn">Expe"): AppComponent@7:5
        Can't bind to 'routerLink' …
Run Code Online (Sandbox Code Playgroud)

angular

4
推荐指数
2
解决办法
3367
查看次数

iOS模拟器不更新位置

下面的代码只工作了一次,现在突然没有显示兴趣点(POI)。我在两台不同的机器上尝试过,但得到了相同的行为。这就是让我困惑的地方,是代码还是我的模拟器设置。

我清理了项目,确保我有自定义的模拟器。我确实现在突然打印了经度和纬度,它也没有在控制台中打印。

导入 UIKit 导入 MapKit 导入 CoreLocation

类 MapViewController: UIViewController, CLLocationManagerDelegate {

@IBOutlet var map: MKMapView!

var manager:CLLocationManager!
var latitude:Double = 0.0
var longitude:Double = 0.0
var location:Double = 0.0

override func viewDidLoad() {
    super.viewDidLoad()
    print("init")
    manager = CLLocationManager()
    manager.delegate = self
    manager.desiredAccuracy - kCLLocationAccuracyBest
    manager.requestWhenInUseAuthorization()
}

func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {

    print("test test test")

    let userLocation:CLLocation = locations[0]
    self.latitude = userLocation.coordinate.latitude
    self.longitude = userLocation.coordinate.longitude

    let request = MKLocalSearchRequest()
    request.naturalLanguageQuery = "Army Recruiting"

    request.region = MKCoordinateRegionMakeWithDistance(userLocation.coordinate, 1600, …
Run Code Online (Sandbox Code Playgroud)

ios swift2

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

无法在 JPA 类上找到合适的构造函数

我收到以下错误:

java.lang.IllegalArgumentException: org.hibernate.QueryException: unexpected char:

 SELECT NEW com.classes.applicant.ApplicantEntry(app.indSsn, app.indivName, app.indAddrLocTx,app.indAddrCityNm,app.indAdrStateAb,app.indAddrZipCd, app.phoneNr,app.workPhoneNr) FROM TApplicant app WHERE app.indSsn = :ssn
Run Code Online (Sandbox Code Playgroud)

类构造函数是正确的:

public ApplicantEntry(String indSsn, String indivName, String indAddrLocTx, String indAddrCityNm, String indAdrStateAb, String indAddrZipCd,
                                 String phoneNr, String workPhoneNr) {
        this.indSsn = indSsn;
        this.indivName = indivName;
        this.indAddrLocTx = indAddrLocTx;
        this.indAddrCityNm = indAddrCityNm;
        this.indAdrStateAb = indAdrStateAb;
        this.indAddrZipCd = indAddrZipCd;
        this.phoneNr = phoneNr;
        this.workPhoneNr = workPhoneNr;

    }
Run Code Online (Sandbox Code Playgroud)

和实体:

@Entity
@Table(name = "T_APPLICANT", schema = "APP")
public class TApplicant implements Serializable, Applicant {
    private static final …
Run Code Online (Sandbox Code Playgroud)

java jpa jpql

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

错误:无法解析TypeDecorator的所有参数:Angular 2 RC-6

我有这个错误超过一天,我不知道为什么.

app.module

import {NgModule} from "@angular/core";
import {BrowserModule} from "@angular/platform-browser";
import {AppComponent} from "./app.component";
import {FormsModule} from "@angular/forms";
import {LoginComponent} from "./Login/login";
import {LoginService} from "./Login/login.service";

@NgModule({
    imports: [BrowserModule, FormsModule],

    declarations: [AppComponent,
        LoginComponent],

    providers:[LoginService],

    bootstrap: [AppComponent]
})
export class AppModule {

}
Run Code Online (Sandbox Code Playgroud)

app.component.ts

import { Component } from '@angular/core';

@Component({
    selector: 'my-app',
    template: '<login></login>'
})
export class AppComponent {

}
Run Code Online (Sandbox Code Playgroud)

login.model.ts

export class LoginModel{

    private userName: string;
    private password: string;

    constructor(userName: string='', password: string=''){
        this.userName = userName;
        this.password = password; …
Run Code Online (Sandbox Code Playgroud)

angular

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

来自服务器的错误(BadRequest):创建“ pod.yaml”时出错:

运行时出现以下错误

kubectl create -f pod.yaml
Run Code Online (Sandbox Code Playgroud)

错误

Error from server (BadRequest): error when creating "pod.yaml": Pod in 
version "ratings:v1" cannot be handled as a Pod: no kind "Pod" is 
registered for version "ratings:v1"
Run Code Online (Sandbox Code Playgroud)

minikube已启动并正在运行,我什至试图将其更改为,kind: Deployment但又出现了另一个错误:

error: unable to recognize "pod.yaml": no matches for /, Kind=Deployment
Run Code Online (Sandbox Code Playgroud)

yaml:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: customer-ratings
  labels:
    app: product-ratings-vue
spec:
  replicas: 1
  selector:
    matchLabels:
      app: product-ratings-vue
  template:
    metadata:
      labels:
        app: product-ratings-vue 
    spec:
      containers: 
      - name: api-service
        image: api-service
        ports:
          - containerPort: 8080 …
Run Code Online (Sandbox Code Playgroud)

kubernetes kubectl

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

使用 Go 运行带参数的 bash 文件

我正在尝试运行具有如下参数的 bash 脚本:

./test.sh param1 param2
Run Code Online (Sandbox Code Playgroud)

bash文件

param1=$1
param2=$2

echo $param1
echo $param2
Run Code Online (Sandbox Code Playgroud)

但是它不起作用,但如果参数不存在,它将起作用。

cmd, _ := exec.Command("/bin/sh", fmt.Sprintf("./test.sh %s %s","test1","test2")).Output()
Run Code Online (Sandbox Code Playgroud)

但是,如果我更改 bash 脚本以执行其他操作而不将任何内容传递给它,那么它就可以工作。

cmd, _ := exec.Command("/bin/sh", "./test.sh").Output()
Run Code Online (Sandbox Code Playgroud)

如何使用 Go 将参数传递到 bash 文件中?

bash go

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

使用Observable初始化Angular 2中的接口

我有一个名为Users的界面,我正在尝试初始化对象,如下所示:

constructor(private _http: Http) {  }

  getUsers(): Observable<User[]> {
        return this._http.get(this._url)
            .map((response: Response) => response.json())

            .do(data => console.log("User data" + JSON.stringify(data)))
            .catch(this.handleError);
    }

    private handleError(error: Response) {
        console.log(error);
        return Observable.throw(error.json().error || 'Internal Server error');
    } 
Run Code Online (Sandbox Code Playgroud)

但是我收到以下错误.

The type argument for type parameter 'T' cannot be inferred from the 
usage. Consider specifying the type arguments explicitly. Type 
argument candidate 'Response' is not a valid type argument because it 
is not a supertype of candidate 'Response'. Types of property 'type' 
are incompatible. …
Run Code Online (Sandbox Code Playgroud)

angular

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

无法使用 kubectl 使用 kubernetes 拉取公共镜像

我运行以下命令,当我检查 Pod 是否正在运行时,我收到以下错误:

无法拉取映像“tomcat”:rpc 错误:代码 = Unknown desc = 清单列表条目中没有与 linux/amd64 匹配的清单

kubectl run tomcat --image=tomcat --port 8080
Run Code Online (Sandbox Code Playgroud)

无法拉取映像“ngnix”:rpc 错误:代码 = 未知 desc = 来自守护程序的错误响应:ngnix 的拉取访问被拒绝,存储库不存在或可能需要“docker 登录”

kubectl run nginx3 --image ngnix --port 80
Run Code Online (Sandbox Code Playgroud)

我在 git 中看到了一篇关于如何在私有存储库导致问题但不是公开问题时完成此操作的帖子。有没有人遇到过这个问题?

kubernetes dockerhub kubectl

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

ORA-01843:执行insert语句时不是有效月份

我有一个查询,它插入一个格式的日期year month day,但我一直得到同样的错误说ORA-01843: not a valid month.看oracle文档看起来我是正确的,这令人困惑.希望得到额外的一双眼睛.

  to_timestamp('2018-07-02 08:03:24.466381 AM', 'RR-MON-DD HH.MI.SSXFF AM')
Run Code Online (Sandbox Code Playgroud)

to_timestamp('2115-07-21 00:00:00.0 AM', 'RR-MON-DD HH.MI.SSXFF AM')
Run Code Online (Sandbox Code Playgroud)

sql oracle

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

./src/main.js 在 multi (webpack)-dev-server/client 中,但我没有 main.js。我想使用打字稿

我正在使用 tailwind 和 typescript 制作一个演示 Vue.js 3 应用程序。每当我运行该应用程序时,我都会收到错误消息:

This relative module was not found:

* ./src/main.js in multi (webpack)-dev-server/client?https://192.168.2.102:8090&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
Run Code Online (Sandbox Code Playgroud)

主要.ts

import { createApp } from 'vue';
import App from './App.vue'
import router from './router'
import './styles/app.css';

createApp(App)
    .use(router)
    .mount('#app');
Run Code Online (Sandbox Code Playgroud)

应用程序.vue

<template>
    <div class="justify-center flex bg-yellow-300 items-center h-screen">
        <div class="text-4xl">
            {{ hello }} 
        </div>
    </div>
</template>

<script lang="ts">
import {Vue} from "vue-property-decorator";

export default class App extends Vue {

    hello = 'Hello world'

}
</script>
Run Code Online (Sandbox Code Playgroud)

vue.config.js

module.exports = { …
Run Code Online (Sandbox Code Playgroud)

typescript vue.js vuejs3

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

春季启动时CSS和Java脚本未呈现404错误

这是我正在使用的路径的片段:

<link rel="stylesheet" type="text/templates.css" href="../templates/css/superfish.css" th:href="@{../templates/css/superfish.css}"/>
<link rel="stylesheet" type="text/templates.css" href="../templates/css/style.css" th:href="@{../templates/css/style.css}"/>
<link rel="stylesheet" type="text/templates.css" href="../templates/css/nivo-slider.css" th:href="@{../templates/css/nivo-slider.css}"/>
<link rel="stylesheet" type="text/templates.css" href="../templates/css/jquery.qtip.min.css" th:href="@{../templates/css/jquery.qtip.min.css}"/>
<link rel="stylesheet" type="text/templates.css" href="../templates/css/jquery-ui.css" th:href="@{../templates/css/jquery-ui.css}"/>
<link rel="stylesheet" type="text/templates.css" href="../templates/css/jquery.fancybox.css" th:href="@{../templates/css/jquery.fancybox.css}"/>
<link rel="stylesheet" type="text/templates.css" href="../templates/css/jquery.fancybox-buttons.css" th:href="@{../templates/css/jquery.fancybox-buttons.css}"/>
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

控制器:

 @RequestMapping(value="/", method= RequestMethod.GET)
    public String contactForm(@Valid @ModelAttribute("contact") Contact contact, BindingResult bindingResult,
                              HttpServletRequest request, Model model, Device device) throws IOException {

        System.out.println("Inside controller-----------------");
Run Code Online (Sandbox Code Playgroud)

主要方法:

@SpringBootApplication
@ComponentScan("com.stidham")
public class StidhamFinancialApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(StidhamFinancialApplication.class);
    }

    public static void …
Run Code Online (Sandbox Code Playgroud)

javascript css spring-boot

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

解析模板“/index.html”时出错,模板可能不存在或可能无法被任何配置的模板解析器访问

我正在尝试使用 spring-boot 解析一个简单的 index.html 文件。如果我输入 localhost:8080/index.html 它会解决,否则我会得到白色错误页面。

我把它贴在 GIT 上;这是一个非常简单的应用程序:Git Hub Link

问题似乎是模型:

在此处输入图片说明

表格型号:

@Entity
@Table(name="applicant")
public class FormModel {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;
    private String name;
    @Email
    private String email;
    @Size(min=2, max=200)
    private String description;

    public String getName() {
        return name;
    }

    @Required
    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    @Required
    public void setEmail(String email) {
        this.email = email;
    }

    public String getDescription() {
        return description; …
Run Code Online (Sandbox Code Playgroud)

spring-boot

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

标签 统计

angular ×3

kubectl ×2

kubernetes ×2

spring-boot ×2

bash ×1

css ×1

dockerhub ×1

go ×1

ios ×1

java ×1

javascript ×1

jpa ×1

jpql ×1

oracle ×1

sql ×1

swift2 ×1

typescript ×1

vue.js ×1

vuejs3 ×1