我在需要构建一些表格模板来显示员工信息的项目中工作,并且协调员选择了其中一名员工来做某事我在来自 AgGridModule 的称为 API 的东西中遇到了一些问题,但是当我尝试选择行以便它可以显示时它在控制台日志中。但我面临一个问题:
StoreComponent.html:2 错误类型错误:无法读取 StoreComponent.push../src/app/Component/store/store.component.ts.StoreComponent.getSelectedRows 处未定义的属性“api”
有人可以帮我解决吗
这是我的代码:- https://stackblitz.com/edit/angular-yfdcbn?file=src%2Fstyles.css
您好,我是角度为6的新手,我遇到了有关身份验证的问题,即无法从没有登录的任何页面中提取用户,我面临的问题是
类“ NeedAuthGuard”错误地实现了类“ CanActivate”。您是否要扩展“ CanActivate”并将其成员作为子类继承?类型“ NeedAuthGuard”缺少类型“ CanActivate”的以下属性:路径,路由[2720]
这是我的代码
import { Injectable } from '@angular/core';
import { HttpClientModule, HttpClient, HttpRequest } from '@angular/common/http';
import { Observable, from } from 'rxjs';
import { map, tap } from 'rxjs/operators';
import { CanActivate } from '@angular/router/src/utils/preactivation';
import { LoginComponent } from '../Component/login/login.component';
import { Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
@Injectable({
providedIn: 'root'
})//NeedAuthGuard
export class ServiceTService {
constructor(
private http: HttpClient
) {
}
users: any = {
id: String,
Email:String,
Password: Number …Run Code Online (Sandbox Code Playgroud) 我正在尝试连接到SQL Server并将数据插入数据库中。我有一个班级人员,主要和DataBaseInfo。我已经为所有错误下载了maven库,但没有成功。我不知道为什么
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns = "http://www.springframework.org/schema/beans"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id='data' class='com.microsoft.sqlserver.jdbc.SQLServerDriver'>
<property name='driverClassName' value ='java.sql.DriverManager'></property>
<property name='dataSource' value ='jdbc:sqlserver://10.222.115.11:1433;databaseName=Test;integratedSecurity=true'></property>
<property name='username' value='HmgDbUser'></property>
<property name='password' value='123456'></property>
</bean>
<bean id='template' class='org.springframework.jdbc.core.JdbcTemplate'>
<property name='dataSource' ref ='data'></property>
</bean>
<bean id='dbi' class='test1.DataBaseInfo'>
<property name='template' ref ='template'></property>
</bean>
</beans>
Run Code Online (Sandbox Code Playgroud)
我的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sample</groupId>
<artifactId>test1</artifactId>
<name> Spring boots test</name>
<version>0.0.2-SNAPSHOT</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/sqljdbc4 -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter …Run Code Online (Sandbox Code Playgroud) angular6 ×2
ag-grid ×1
angular7 ×1
java ×1
maven ×1
spring ×1
spring-boot ×1
sql-server ×1
typescript ×1