翻译(Angular)应用程序有多种方法,主要的主要方法是:
和
到目前为止,据我所知,i18n对搜索引擎优化更容易,因为浏览网页很干净
例如
app.com/de
app.com/en
另一方面,使用ngx-translate,在语言之间切换更容易.
我知道ngx-translate的创建者是由Angular聘用的i18n. 任何人都可以说我的主要区别是什么(优点/缺点)?
当我有190次测试时,jenkins可以运行任何罚款,在191之后我得到以下错误:
Chrome 64.0.3282(Linux 0.0.0)错误{"message":"脚本错误.\nat:0:0","str":"脚本错误.\nat:0:0"}
有人能告诉我这是什么意思吗?
Karma版本(业力的输出 - 版本):2.0.0
你的karma.config.js文件的相关部分
module.exports = function (config)
{
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client: {
clearContext: false
},
files: [
{ pattern: './src/test.ts', watched: false }
],
preprocessors: {
'./src/test.ts': ['@angular/cli'],
},
mime: {
'text/x-typescript': ['ts', 'tsx']
},
coverageIstanbulReporter: {
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
```
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'coverage-istanbul']
: ['progress', 'kjhtml'],
port: 9876,
colors: …Run Code Online (Sandbox Code Playgroud) 这是我的hashmap:
HashMap<Long, Day> hashMapTest = new HashMap<Long, Day>();
Run Code Online (Sandbox Code Playgroud)
我插入Date.getTime()这个hashmap,如:
Date start = new Date(vonDatum.getTime());
for (int i = 0; i < tagediff; i++)
{
Day day= new Day(start);
this.mitarbeiterTagHashMap.put(start.getTime(), day);
CalendarUtil.addDaysToDate(start, 1);
}
Run Code Online (Sandbox Code Playgroud)
奇怪的是当我调用hashmap时,顺序完全是另一个,并且键不适合插入:
for (Long name : hashMapTest.keySet())
{
Window.alert(name + ": " + hashMapTest.get(name));
}
Run Code Online (Sandbox Code Playgroud) 身份验证对我来说有点过头了.
我的理解是:
我检查了几个选项:
具有轻松实现Facebook等第三方认证的优势.您可以轻松使用ASP.NET Core身份根据角色授权API.
使用此方法,您必须创建自己的标识用户并从数据库中获取它.
客户端在发送您必须发送的请求时将令牌保存在cookie中.
我的前端是用JS编写的,而后端是ASP.NET Core,所以它是CORS.
我不知道应该使用什么,为什么?为什么许多人建议使用IdentityServer4; 是不是简单的自定义身份验证?
(我在IdentityUser属性和"隐藏"数据库检查方面遇到问题)
我有 2 个模型:
public class Text
{
public long Id { get; set; }
public string Text { get; set; }
}
public class User
{
public int Id { get; set; }
public ICollection<Text> Texts { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我建立在用户基础上的模型是
e.HasMany(o => o.Texts).WithOne().HasForeignKey(d => d.Id).IsRequired();
Run Code Online (Sandbox Code Playgroud)
当我尝试运行时:
dotnet ef 迁移添加
我收到此错误:
带有外键属性 {'Id' : long} 不能定位主键 {'Id' : int} 因为它不兼容。为此关系配置一个主键或一组兼容的外键属性。
更新:
新模型应该能够拥有表格文本的集合,例如:
public class Customer
{
public int Id { get; set; }
public ICollection<Text> Texts { get; set; …Run Code Online (Sandbox Code Playgroud)