aspnet / blazor.docs Goto Github PK
View Code? Open in Web Editor NEWDocs for Blazor
Home Page: https://blazor.net/
License: Creative Commons Attribution 4.0 International
Docs for Blazor
Home Page: https://blazor.net/
License: Creative Commons Attribution 4.0 International
HttpClient
Convert components sample from 0.2.0-preview1-10155
to 0.2.0
and drop Nuget.config/global.json.
Title: Blazor components
UID: client-side/blazor/components/index
URL: https://docs.microsoft.com/aspnet/core/client-side/blazor/components
We shouldn't have the Blazor assemblies checked into the docs repo. Instead we should have some automation that restores the Blazor packages and extracts the Blazor assemblies and XML doc files that we can then run docfx on.
We should document how to setup a code behind file using @inherits
. Later, we can update this section when we implement support for partials (https://github.com/aspnet/Blazor/issues/278)
BlazorComponent
base classesLink API references to the API topics.
Event handlers can be async and return Task
.
StateHasChanged()
Add the FAQ to the introduction folder.
Texas two-step ...
For https://blazor.net/docs/host-and-deploy/index.html#app-base-path, surface that NavLink
s must also receive the URL segment to work. The current text adequately covers the <base> tag but nothing is mentioned about the NavLink
s.
Would be nice to be able to export docs to PDF. DocFx supports PDF export, but has a dependency on wkhtmltopdf which might be a little hard to integrate with the GitHub pages hosting.
I think the way to do this would be to integrated it into the AppVeyor build. There's a Chocolatey package for wkhtmltopdf, and AppVeyor supports Chocolatey installs, so that may be one way to do it. Another is just to use the wphtmltopdf installer.
Once that dependency is in place, we just need to add a pdf section to our docfx.json file and we'll have a PDF generated.
Title: Blazor layouts
UID: client-side/blazor/layouts
URL: https://docs.microsoft.com/aspnet/core/client-side/blazor/layouts
We should move the routing content out of the components doc into a separate routing topic.
@page
NavLink
componentRemove all references to ILayoutComponent
. This interface will no longer exist in Blazor 0.3.0. Replace all layouts’ @implements ILayoutComponent
with @inherits BlazorLayoutComponent
and remove the @functions { .. }
block that declares the Body
property (since that’s now inherited from the base class).
If you like please add this site to community page's samples section.
Thank you.
http://lupusablazordemos.azurewebsites.net/
Excellent introduction. One place for improvement: The databinding didn't make sense. The statement "The Year parameter is bindable because it has a companion YearChanged event that matches the type of the Year parameter." needs to explain the action. Also, what is format-value in <input bind="@StartDate" format-value="yyyy-MM-dd" />
Is this a blazor tag-helper? That needs explanation.
Blazor JavaScript and TypeScript interop
docs/javascript-typescript-interop.md
Add the JS interop example into the sample app.
Attribute component parameters with [Parameter]
Component parameters should be private properties. Analyzer will flag parameters defined with public properties.
See dotnet/blazor#685 for lots of details.
We should have a topic around the new component library template that shows how to build, package, and share libraries of components.
See https://blogs.msdn.microsoft.com/webdev/2018/04/17/blazor-0-2-0-release-now-available/ for some existing content.
Since I just used the Components sample as the demo for the Routing topic on #102, let's move the Components topic sample to a better position in the TOC (up one level) and rename it so that it applies better to any topic in the TOC. We can just run with one sample (for the reference topics only) for a while, which will simplify maintenance of all of the topics during preview. The tutorial will still have its own sample, and it will stay in its current position.
This is low priority work and can be performed at any time. Backlogging it for now.
StateHasChanged
In the Dependency injection in services section,
the class and the constructor don’t match
public class DataAccess : IDataAccess
{
// The constructor receives an HttpClient via dependency
// injection. HttpClient is a default service offered by Blazor.
public Repository(HttpClient client)
{
...
}
...
}
Title: ASP.NET Core Blazor
UID: client-side/blazor/index
URL: https://docs.microsoft.com/aspnet/core/client-side/blazor/
Note in Host and deploy pertaining to local hosting of static assets:
Blazor sets up its own static file middleware to handle static file requests to content from the Blazor client app, not from the server project.
Note first tho that a CDN should be used for static assets and mention+link Azure Storage/CDN for this purpose.
Note that static assets for the client-side app can't be hosted in the server-side app using Static File Middleware at this time.
Hi,
it was founded a kind of typo in the Child content section of the Components page:
ChildComponent.cshtml:
<div class="panel panel-success">
<div class="panel-heading">@Title</div>
<div class="panel-body">@PanelContent</div>
</div>
@functions {
public string Title { get; set; }
public RenderFragment **PanelContent** { get; set; }
}
I got a fault when trying to execute this example. After a discussion in an issue report https://github.com/aspnet/Blazor/issues/686 it was founded the PanelConent field's name is incorrect. It is suggested to rename this to ChildContent. Unfortunatelly, there are still some errors with this name using. As a result I'm not sure how this example should be improved.
The "active" class is hitting the wrong list item. The UI scrolls to the right spot, but it highlights the wrong entry.
For the following example, I clicked on "Build a todo list" ... "Dependency injection" is receiving the "active" CSS class.
cc/ @danroth27
Ex --pathbase
Title: Build your first Blazor app
UID: client-side/blazor/first-app
URL: /build-your-first-blazor-app
Reference:
Title: Host and deploy Blazor
UID: client-side/blazor/host-and-deploy/index
URL: https://docs.microsoft.com/aspnet/core/client-side/blazor/host-and-deploy
Title: Introduction to Blazor
UID: client-side/blazor/introduction/index
URL: https://docs.microsoft.com/aspnet/core/client-side/blazor/introduction/
See https://github.com/aspnet/Blazor/issues/413#issuecomment-379435380.
This is essentially blocked until it can be determined if a completely flat directory structure for published assets will be instituted. Without a flat directory structure, a Blazor deployment can't sit in the $root
container of Azure Storage (/
path delimiters aren't allowed in the $root
container).
Update screen shots and code snippets taken from the templates
Title: Dependency injection in Blazor
UID: client-side/blazor/dependency-injection
URL: https://docs.microsoft.com/aspnet/core/client-side/blazor/dependency-injection
Title: Blazor JavaScript and TypeScript interop
Path: docs/javascript-typescript-interop.md
UID: client-side/blazor/javascript-typescript-interop
TOC: JavaScript/TypeScript interop
between Dependency Injection
and Host and deploy
Add to toc.md and to the docs index.md page in the same spot as the TOC.
@syedshanu has a nice sample about using Blazor with ASP.NET Core and EF:
It would be great to list this sample on the Blazor Community page.
@syedshanu do you want to submit a PR for this? Which link would you prefer we use?
Regarding https://blazor.net/docs/host-and-deploy/index.html:
Microsoft.AspNetCore.Blazor.Server
index.html
, should clarify that this is the file under wwwroot
, and not the similarly-sounding Index.cshtml
.These suggestions taken from https://github.com/aspnet/Blazor/issues/961
Update API refs for Blazor 0.3.0.
See dotnet/blazor#685 for details
See dotnet/blazor#691 for details.
Title: Troubleshoot Blazor
UID: client-side/blazor/troubleshoot/index
URL: https://docs.microsoft.com/aspnet/core/client-side/blazor/troubleshoot
Content: TBD
https://blazor.net/docs/host-and-deploy/index.html#app-base-path
Add a trailing slash to <base> href
in examples.
Thanks @RemiBou for reporting in https://github.com/aspnet/Blazor/issues/668.
Because this isn't a tutorial, let's try to avoid screenshots if possible and just provide a list of steps with links out to other topics if/when it makes sense ... especially to our aspnet/Docs topics:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.