Aspnetcore: Add support for @namespace directive for components

Created on 27 Feb 2019  路  5Comments  路  Source: dotnet/aspnetcore

I'm not sure if this was intentional but looks like we don't really support namespace directive in component documents. To support this, we'll need to add a ComponentNamespaceDirective similar to ComponentPageDirective.

Although the behavior of this directive isn't any different from regular Mvc/Pages, we can't use the same type because the existing NamespaceDirective resides in Mvc.Razor.Extensions and we can't move it over to Razor.Language because it is not supported in 1.x apps.

Note: This is a prerequisite for supporting namespace directives with usings in https://github.com/aspnet/AspNetCore/issues/5577

cc @rynowak

Done area-blazor enhancement

Most helpful comment

@SteveSandersonMS @mkArtakMSFT @danroth27

We're getting LOTS of feedback about this gap now that components are based on namespaces. We need to do this for preview 6.

All 5 comments

Could we move it over to Razor.Language but only add it for Razor >= 2.0?

Either way we should support this.

@SteveSandersonMS @mkArtakMSFT @danroth27

We're getting LOTS of feedback about this gap now that components are based on namespaces. We need to do this for preview 6.

Great, let's do it! I see it's labelled XS already.

Is it possible to grab a task like this (or another one) to contribute?
I would love to start some contributions here

@isc30 thanks for your interest in contributing. You can pick any of the tasks that are labelled up-for-grabs https://github.com/aspnet/AspNetCore/issues?q=is%3Aopen+is%3Aissue+label%3Aup-for-grabs+label%3Aarea-mvc

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kevenvz picture Kevenvz  路  3Comments

FourLeafClover picture FourLeafClover  路  3Comments

groogiam picture groogiam  路  3Comments

fayezmm picture fayezmm  路  3Comments

guardrex picture guardrex  路  3Comments