C
C#TheCultOfRa

Index NavLink not working in NavMenu

I have two pages, Index and Register My navbar's SkullDugDungeon text should redirect to Index/Home While the Register NavLink works, the former does not.
T
TheCultOfRa609d ago
if any other files are needed, lemme know
Z
ZacharyPatten609d ago
well yes you shared some files, but it still isn't all the files, and sharing the files in that format isn't very helpful we can't take your files and run it at this point since you appear to be fine making the code public, why not just make a GitHub repo?
T
TheCultOfRa609d ago
I think I had some secrets in dev or something checking
Z
ZacharyPatten609d ago
if you had secrets in your code at one time you need to make sure you scrub your git repo you should never put secrets in the source code they will be accessible in the git history
T
TheCultOfRa609d ago
yeah I know; ive not uploaded to a repo yet and just checked this project does not have any uploading in a sec is there a way for me to push only one project to a repo instead of a whole solution?
Z
ZacharyPatten609d ago
yeah sure are you new to git? git is a vital skill every developer needs to know if you aren't very familiar with git yet you need to learn
T
TheCultOfRa609d ago
uh kinda? I don't use it a huge amount I just need to run the cmd line options im guessing?
Z
ZacharyPatten609d ago
there are many git interfaces
T
TheCultOfRa609d ago
I'm using VS
Z
ZacharyPatten609d ago
but yes many developers prefer the comamnd line if you don't want to upload the entire solution to GitHub then I would just use the CLI (command line) can you run this command? git --version
T
TheCultOfRa609d ago
yeah git version 2.30.0.windows.1
Z
ZacharyPatten609d ago
okay. that is not the latest version but that si fine did you already make a repo in GitHub?
T
TheCultOfRa609d ago
updating about to
T
TheCultOfRa609d ago
GitHub
GitHub - SKullDugDev/SkullDugDungeon.Web
Contribute to SKullDugDev/SkullDugDungeon.Web development by creating an account on GitHub.
Z
ZacharyPatten609d ago
Will look once I have time. probably busy for next few hours at least
B
blinkbat609d ago
where does the one with href="" take you? my instinct is to do href="/" try including the leading slash with all of your links
Z
ZacharyPatten609d ago
we still can't run your code. you checked in the Web Project but not the Shared project so your code doesn't build
T
TheCultOfRa609d ago
wait what? that should be the whole project oh you need the shared project too gotcha hold on
Z
ZacharyPatten609d ago
it is but you reference another project
T
TheCultOfRa609d ago
hmmmm what's the easiest way to combine these dammit can I just push the other project to the same repo? would that work? like meaning would that make it build for yall no where it just doesn't do anything
B
blinkbat609d ago
did you try adding /?
T
TheCultOfRa609d ago
yeah, I had tried that already and knew it worked; I was mainly asking why doing it like the documentation/boilerplate wasn't
T
TheCultOfRa607d ago
@ZacharyPatten @blinkbat sorry for the delay, I believe it should be buildable now with both projects in the repo including the sln file https://github.com/SKullDugDev/SkullDugDungeon.Web
GitHub
GitHub - SKullDugDev/SkullDugDungeon.Web
Contribute to SKullDugDev/SkullDugDungeon.Web development by creating an account on GitHub.
T
TheCultOfRa606d ago
I am still unable to determine why it doesn't work without the / when the doc doesn't include it in fact, in the Blazor WASM boiler plate, the nav even has a non nav-link <a> that also has no href <a class="navbar-brand" href="">BlazorApp1</a> in addition to
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
like I know I can use the / but I want to understand what's happening that's making it required this also makes it less clear why the href is empty:
If the a element has an href attribute, then it represents a hyperlink (a hypertext anchor) labeled by its contents.

If the a element has no href attribute, then the element represents a placeholder for where a link might otherwise have been placed, if it had been relevant, consisting of just the element's contents.
If the a element has an href attribute, then it represents a hyperlink (a hypertext anchor) labeled by its contents.

If the a element has no href attribute, then the element represents a placeholder for where a link might otherwise have been placed, if it had been relevant, consisting of just the element's contents.
https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element so yeah I've done as much research as I can so just lemme know if yall can help anyone? should I just repost or something?
G
Godspeed605d ago
So to clarify, the question is why <NavLink href"" /> does not redirect to the base page? Can you try adding <base /> or <base href="/" /> to your index.html file?
T
TheCultOfRa605d ago
yes ohhh that probably is what I'm missing damn i saw a thing about it but didn't see where it was in the original boilerplate testing now yup! that works! thank you so much!
G
Godspeed605d ago
No worries! Glad it worked :) That one can also be used if you want a different base route, like domain.org/something/ as base
T
TheCultOfRa605d ago
ah ok, that makes sense thank you again!
B
blinkbat605d ago
i mean, href="" is bizarre to me anyway, but if it's in the docs I guess go for it
Z
ZacharyPatten604d ago
nice catch. 🙂
Want results from more Discord servers?
Add your server
More Posts
Refactoring if elseHelp ! ```cs partial void OnNameChanging(string value) { _validationService.CleaCustom MSBuild SDK not found after uploading new versionI'm fiddling with a custom MSBuild SDK, and everything has worked fine up until now. I just tried toHow to create an observable collection that filtered from other observable collectionI wanna create a filter version of the ErrorList, and I want the ErrorList add or delete Item it wilHelp with LinqThe image should be enough to explain what I want to achieveAddDistributedTokenCaches and custom IDistributedCacheAnybody with experience of AddDistributedTokenCaches ? I would like to use a custom provider insteadRazor component. The child content element 'ChildContent' of component 'EditForm' uses the same paraIf I understood correctly, I think the problem is with ***Model*** attribute, though the name is notHow to migrate table?I have database with table: Quote, so i tried to migrate new table Author on database using package What is MVC?I've seen a some quick explanations of model viewer controller but without knowing what the actual cWriteAsync doesn't always send data to all connected clientsI am making an application that has a TCP client that listens for messages from a TCP server, then Why can't I converter theIEnumable to a list ?```cs public IEnumerable GetErrors(string propertyName) { return _properNeed Help for MSGraph [Answered]Hi, I'm new here in the discord, and found out that the community here is nice. Lots of things. So Load local db file to memoryHow do I load local db file to memory?miniMax algorithmhey guys i need to implement minimax algorithm to my basic console xox game.any help appreciated. hDeserialize wrapper object in routeHello. Does anyone know if it is possible to map deserilize a custom wrapper object in a route? IDsVS JB Mono font not looking like Rider JB Mono font [Answered]I have to use vs 2022 due to rider not supporting xaml hot reload and am trying to make it look simiJsonSerializer.DeserializeAsync() randomly hangs indefinitely [Answered]```cs private static async Task<T> TryReadDataFromFile<T>(string basePath) where T : class { vardotnet6 project failing on static abstracts with preview features set to true``` C:\Users\Kellen James\source\Repos\ClemBot\ClemBot.Api\ClemBot.Api.Core\Features\Tags\Edit.cs(51I need to serialize a bunch of non-primitive types. How would I do this?I'm using JsonSerializer.serializeToUtf8Bytes I need to serialize a class that contains a bitmap, anWhen to use ValueTask?Despite having used C# for a while I'm... not *that* familiar with async. I know people sometimes saHow would you design a solution to this problem?unsure what would be the best approach - I have a SQL table that stores SMS 3rd party providers. E