我的项目是使用[Angular CLI] 1.2.6版生成的.
我可以编译项目,它工作正常,但我总是得到错误的vs代码告诉我找不到模块'@ angular/core'找不到模块'@ angular/router'找不到模块.....
我附上了我的tsconfig.json文件的内容,这对我来说真的很令人沮丧,花了2个小时来弄清楚出了什么问题,我还卸载并重新安装了vs代码它不起作用.
这是我的环境规范:
@angular/cli: 1.2.6
node: 6.9.1
os: win32 x64
@angular/animations: 4.3.4
@angular/common: 4.3.4
@angular/compiler: 4.3.4
@angular/core: 4.3.4
@angular/forms: 4.3.4
@angular/http: 4.3.4
@angular/platform-browser: 4.3.4
@angular/platform-browser-dynamic: 4.3.4
@angular/router: 4.3.4
@angular/cli: 1.2.6
@angular/compiler-cli: 4.3.4
@angular/language-service: 4.3.4
Run Code Online (Sandbox Code Playgroud)
os:微软vs 10企业
项目根文件夹
.angular-cli.json
.editorconfig
.gitignore
.vscode
e2e
karma.conf.js
node_modules
package.json
protractor.conf.js
README.md
src
tsconfig.json
tslint.json
Run Code Online (Sandbox Code Playgroud)
node_module文件夹
-@angular
--animations
--cli
--common
--compiler
--compiler-cli
--core
---@angular
---bundles
---core.d.ts
---core.metadata.json
---package.json
---public_api.d.ts
---README.md
---src
---testing
---testing.d.ts
---testing.metadata.json
--forms
--http
--language-service
--platform-browser
--platform-browser-dynamic
--router …Run Code Online (Sandbox Code Playgroud) 我正在使用firebase cli,我尝试以下方法
$ firebase init
Run Code Online (Sandbox Code Playgroud)
cli继续留言:
您即将在此目录中初始化Firebase项目:c:\ Dev\Test您准备好继续吗?
我输入y并选择主机:配置和部署Firebase托管站点
几秒后我得到了错误
Error: Server Error. connect ETIMEDOUT 104.197.85.31:443
Run Code Online (Sandbox Code Playgroud)
可能是什么问题?
我的环境规范:
CLI Version: 3.9.1
Platform: win32
Node Version: v7.10.0
Time:Thu Jun 08 2017 18:03:14 GMT+0430 (Iran Daylight Time)
Run Code Online (Sandbox Code Playgroud)
我也使用PSIPHONE作为代理,但我也尝试过没有PSIPHONE.
在这两种情况下我都得到连接超时
我已经ping了104.197.85.31连接正常.
有什么建议可以解决这个问题吗?
是因为我在伊朗?
如何在 Semantic UI React 中居中对齐按钮
我尝试了几种方法,使用网格、网格行,但没有成功
import {Segment, Button,Label,Sticky,Grid,Container} from 'semantic-ui-react';
import React, {Component} from 'react';
const GeneralSupportSegment =() => (
<Segment>
<Label ribbon color="blue" size="large">Support</Label>
<Button>contact us</Button>
</Segment>
);
export default GeneralSupportSegment;
Run Code Online (Sandbox Code Playgroud) 我已经设置 Hangfire 如下:
var t = IocManager.Resolve<TestJob>();
RecurringJob.AddOrUpdate("sendDailyEmail",() => t.sendEmail(), Cron.Daily);
Run Code Online (Sandbox Code Playgroud)
当我访问 Hangfire 仪表板时,我可以看到重复作业 1,但该作业未执行,并且出现以下错误:
无法加载文件或程序集“DynamicProxyGenAssembly2,Version=0.0.0.0,Culture=neutral,PublicKeyToken=null”或其依赖项之一。该系统找不到指定的文件。
我的设置有什么问题吗?
我在角度应用中使用angular2-toaster
这很简单,
您在组件的模板中定义烤箱容器
<toaster-container></toaster-container>
Run Code Online (Sandbox Code Playgroud)
并且您使用类型的toasterService ToasterService来弹出烤面包机
this.toasterService.pop('success', 'Args Title', 'Args Body');
Run Code Online (Sandbox Code Playgroud)
但是这种方法存在问题,我不想在我想要弹出烤面包机的每个组件中定义一个容器,我想在root组件中定义一次.应用程序引导程序,但当我这样做,我得到错误
No Toaster Containers have been initialized to receive toasts.
Run Code Online (Sandbox Code Playgroud)
任何解决方案
如何链接玉石模板中的按钮?我正在尝试生成HTML
<a href="create"><button type="button">create new post</button></a>
Run Code Online (Sandbox Code Playgroud)
我试过了
a(href="create") button "create new post"
Run Code Online (Sandbox Code Playgroud)
结果
<a href="create">button "create new post"</a>
Run Code Online (Sandbox Code Playgroud)
如果我改成它
a(href="create")button "create new post"
Run Code Online (Sandbox Code Playgroud)
我收到了错误
logJs\views\posts\update.jade:7 5| block content 6| h1='creating new post' > 7| a(href="create")button "hello word" 8| form(name="add-post",method="post") 9| div.input 10| span.label title Unexpected token `tag` expected `text`, `code`, `:`, `newline` or `eos`
Run Code Online (Sandbox Code Playgroud) 我有一个模特
class AnnouncementDocument {
Id: String;
IsDeleted: Boolean;
Name: String;
TemporaryName: String;
Description: String;
AnnouncementDocumentTypeId: Number;
}
Run Code Online (Sandbox Code Playgroud)
在我正在使用的模板中
*ngIf="announcementDocumentTypeId==1
Run Code Online (Sandbox Code Playgroud)
我得到了错误
[Angular] Expected the operants to be of similar type or any
Run Code Online (Sandbox Code Playgroud)
正确,因为模板中的1被视为字符串而非数字
我该如何解决这个问题?
无法将运算符“ +”应用于类型“ Number”和“ 1”时出现错误
buildQuerySpec() {
return {
PageSize: this.paging.PageCount,
CurrentPage: this.paging.PageIndex + 1,
MaxSize: '',
Filters: this.filter,
OrderFields: [],
IsDescending: false
};
}
Run Code Online (Sandbox Code Playgroud)
出什么问题了
CurrentPage: this.paging.PageIndex + 1,
Run Code Online (Sandbox Code Playgroud)
pageIndex是数字,真的不知道。
过去几周我一直在研究 .NET Core,并决定尝试 EF Core(来自 ASP.NET MVC 和 NHibernate)。经过一番挖掘后,我发现了一个很好的扩展,称为EF Visual Designer。它允许我直观地创建模型并生成代码。
我定义了一个简单的一对一关系,如图所示: 简单的一对一关系
生成代码后,我得到以下 Fluent API 代码:
modelBuilder.Entity<Authentication>()
.ToTable("Authentications")
.HasKey(t => t.Id);
modelBuilder.Entity<Authentication>()
.Property(t => t.Id)
.IsRequired()
.ValueGeneratedOnAdd();
modelBuilder.Entity<User>()
.ToTable("Users")
.HasKey(t => t.Id);
modelBuilder.Entity<User>()
.Property(t => t.Id)
.IsRequired()
.ValueGeneratedOnAdd();
modelBuilder.Entity<User>()
.HasOne(x => x.Authentication)
.WithOne()
.HasForeignKey("Authentication_Id")
.IsRequired();
Run Code Online (Sandbox Code Playgroud)
用户类具有以下(相关)属性:
public Class User {
[Key]
[Required]
public Guid Id { get; set; }
...
public virtual Authentication Authentication { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
身份验证具有以下(相关)属性:
public class Authentication {
[Key]
[Required]
public …Run Code Online (Sandbox Code Playgroud) 我在gitHub中发布一个问题我希望用户看到我的Html代码在消息但代码是我已经尝试过的数百但是它不起作用,我如何在github中将html设置为meesage的一部分?谢谢
angular ×4
c# ×2
typescript ×2
firebase ×1
github ×1
hangfire ×1
pug ×1
reactjs ×1
semantic-ui ×1