小编TSR*_*TSR的帖子

Aurelia路由器导航和导航ToRoute

在应用程序中,我希望导航到home/contract-view/10一个动作.试着

this.router.navigateToRoute(`home/contract-view`, { id: 10}, { absolute: true });
Run Code Online (Sandbox Code Playgroud)

失败了 Route home/contract-view not be found

另一个尝试:

this.router.navigate(`#/home/contract-view`, { id: 10});
Run Code Online (Sandbox Code Playgroud)

失败了Route not found: contract-view(…) 如何实现这一目标?App.ts:

configureRouter(config: RouterConfiguration, router: Router) {
        config.title = 'Contracts Portal';
        config.map([
            { route: ['', 'dummy'], name: 'dummy', moduleId: 'dummy', nav: false, title: 'Dummy', settings: { pos: 'left' } },
            { route: 'home', name: 'home', moduleId: 'home', nav: true, title: 'Home', settings:{pos: 'left', class: 'home' }, auth: true },
        ]);
        this.router = router;    
    } …
Run Code Online (Sandbox Code Playgroud)

aurelia aurelia-navigation aurelia-router

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

dotnet核心中的Enum Description属性

我们Description在dot net CLI中有Enums的属性吗?(Dot Net Core RC2)如果没有,还有其他选择吗?

.net .net-core dotnet-cli .net-core-rc2

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

Web Api(MVC 6)Chunked body没有正确终止0大小的块

我使用MVC 6 rc1与EF 7 rc 1 Code First Model通过web api控制器检索数据.我有3个类似于下面的表.

class Product
{
    public int Id { get; set; }
    public string SomeProperty { get; set; }
    public virtual ICollection<Categorization> Categorizations { get; set; }
    public DateTime SomeProperty2 { get; set; }
    public string SomeProperty3 { get; set; }
    public string SomeProperty4 { get; set; }

}

// NOTE: Entity key should be (ProductId, CategoryId)
class Categorization
{
    public int ProductId { get; set; }
    public Product Product { get; …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-mvc asp.net-web-api entity-framework-core asp.net-core-mvc

6
推荐指数
2
解决办法
1516
查看次数