Git Product home page Git Product logo

angularjs-spa-template's People

Contributors

koistya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angularjs-spa-template's Issues

How to connect sign in with backend (web api) services

I'm assuming it must involve some degree of cookies passing between client and server?

That is, in my Startup.ConfigureAuth(IAppBuilder app), I've got this:

            // Enable the application to use a cookie to store information for the signed in user
            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString("/login")
            });

            // Use a cookie to temporarily store information about a user logging in with a third party login provider
            app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);

But am not entirely sure what that means. I don't want to redirect to /login, for instance, if I can just pass the front page sign in details, user name and/or email and password, with or without cookie, to a backend authentication service.

Then from that point forward, how to maintain some level of authentication. i.e. user id with or without session id for security reasons. That sort of thing.

~/scripts/controllersSpec.js missing

included in Views/Jasmine/SpecRunner.html:

<!-- include spec files here... -->
<script src="~/scripts/controllersSpec.js"></script>

This should be controllers.spec.js

Bootstrap.js missing

bootstrap.js is missing, menu does not work when display width gets smaller.
==> Include the Bootstrap nuget package as well.
==> Modify code in BundleConfig.cs to:
bundles.Add(new ScriptBundle("/js/app").Include(
"
/scripts/bootstrap.js",
"/scripts/vendor/angular-ui-router.js",
"
/scripts/filters.js",
"/scripts/services.js",
"
/scripts/directives.js",
"/scripts/controllers.js",
"
/scripts/app.js"));

(The bootstrap.js package is NOT added to the vendor folder by the bootstrap nuget package)

Module not found

I'm trying to use Material instead of Bootstrap in an Angular project template project inside an asp.net core 2.1 solution in VS 2017.
I'm using Angular 7, but the ClientApp won't let me remove Bootstrap, since I read Bootstrap and Angular material are mutually exclusive.

The problem is when I run ng serve on the command line as instructed incorrectly here:
https://docs.microsoft.com/en-us/aspnet/core/client-side/spa/angular?view=aspnetcore-2.1&tabs=visual-studio
npm start doesn't work.

Everything worked fine until I tried to remove Bootstrap. But I want to use Angular Material instead !!

This has also wasted me an entire day, since, I decided to start afresh with a new project, yet for some strange reason the ClientApp angular project in the .net core solution insists on using Angular 5.2.0, instead of the latest. So now I've got to go through the process of updating all the package.json stuff. :(

Incomplete Contacts versus About

Hello,

As a boilerplate example, excellent piece of work, to begin with. But it is only a beginning. I'm sure that's been reiterated ad infinitum, so to speak. I found a couple of concerns, and I wonder if you can suggest better approaches.

It seems like I needed to add Contacts in a couple different places in order for the wiring to even begin to operate "correctly". "Correct" in this case meaning, at minimum, no 404 errors; in practice, well that's another story beyond the scope here.

As a backdrop, it's not the SOLID-est, nor GRASP-iest, Insert-Favorite-Architectural-Reference-Here, etc, boilerplate code around. But it is an interesting case study. Perhaps that's also some of the Angular MVC-ness rearing its ugly head, as comingled with the ASP.NET MVC container, I don't know.

First, I needed to add a Contacts.cshtml. No problem. That could draw from whatever data model backs it up. Fine, great.

Then I needed to add a ContactsCtrl to the controller.js. Okay, great. It's starting to be a bit verbose in the definition, but again, fine. We're tracking, I think.

Finally, for the wiring to behave "properly", no 404, etc, I needed to connect a contacts state in the app.js. Then all was well, the Contacts page appeared.

Victory! For the moment...

In practice, I would like to keep track of modules, features, user (or group) based roles, authorization, and so on, in the back-end, and have that programmatically inform the application, views, etc. From reading and some experience, that seems like how it's done in production quality code. Apart from special cases, Angular controllers, services, etc, to special FE business logic, I'd like for that to be more than less server-oriented, data-driven, if you will.

Interested in whatever feedback you can provide concerning this.

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.