GithubHelp home page GithubHelp logo

Found markup element with unexpected name 'Customers'. If this is intended to be a component, add a @using directive for its namespace. about cs11dotnet7 HOT 3 OPEN

johntempest avatar johntempest commented on May 1, 2024
Found markup element with unexpected name 'Customers'. If this is intended to be a component, add a @using directive for its namespace.

from cs11dotnet7.

Comments (3)

markjprice avatar markjprice commented on May 1, 2024

None of the steps on page 723 need to import the Packt.Shared namespace because you are not using the entity models yet. The error message you see is probably because either you named the Customers.razor file something different so it cannot find it when it looks for Customers, or you created it in a folder other than Pages so it's not found by default.

from cs11dotnet7.

johntempest avatar johntempest commented on May 1, 2024

I did correctly name the Customers.razor file and it was created in the Pages folder, and I will have to concede that importing the Packt.Shared namespace was not necessary at that time. It still doesn't explain why the statements added in step 3, page 723, show up in the Visual Studio editor underlined with a green squiggle which lists the warning with the text supplied quoted in the heading to this issue I raised. I've now got as far as page 735 in the book and the warning squiggles still show on those lines added to the Index.razor file in step 3. So why the text "Customers in Germany/Customers Worldwide" didn't appear until after I'd made the adjustment is still unclear to me.

I find that there are many things that I still do not understand, and have to take on trust. Templates on creating files can be sometimes contain significant differences from the code presented in the book without any covering explanation. And sometimes making a link between the result and a statement of code which brings about that result is not always obvious -- unless perhaps you are well versed in the underlying software which is hidden from view.
I now feel wary about raising another issue, but I wonder why in Task Update (0n page 733) there is no statement : navigation.NavigateTo("customers"); as in the New and Delete functions to return to the /customers page. Without it, you get stuck on the page with an Update button that doesn't do anything any more, and the only way out is via the web browser's uri box.

from cs11dotnet7.

markjprice avatar markjprice commented on May 1, 2024

Yes, I agree it's unclear to me as well as to why you got that warning message. It doesn't make sense to me.

FYI, there is already an errata item for the issue on page 733 here:
https://github.com/markjprice/cs11dotnet7/blob/main/docs/errata/errata.md#page-733---building-customer-create-edit-and-delete-components

from cs11dotnet7.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.