Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
This repository was archived by the owner on Jul 29, 2026. It is now read-only.

Login and Signup form as directive #552

Closed

Description

@remicastaing

Is there an interest to write the login and the signup form in directives. I see following advantages:

  • the login and signup controllers isn't anymore bound with a view;
  • the two forms could be easily moved to another place (on the landing page or on a modal view);

Should I propose a PR?

Activity

  1. 18601673727 commented on Sep 16, 2014

    @18601673727

    Why not we integrate with satellizer(https://github.com/sahat/satellizer), so lets stop from rebuilding wheels.

  2. thomporter commented on Sep 16, 2014

    @thomporter

    I would hate to see support for PassportJS dropped. There are just too
    many providers they support http://passportjs.org/guide/providers/.

  3. kingcody commented on Sep 16, 2014

    @kingcody
    Member

    I agree with @thomporter.

  4. JaKXz commented on Sep 25, 2014

    @JaKXz
    Collaborator

    I too agree with @thomporter. Having directives that use the $scope of whatever page they're on for the reusable components would be very nice though.

  5. kingcody commented on Sep 26, 2014

    @kingcody
    Member

    @remicastaing do you have a branch for this? I have a working setup that I'd be happy to share.

  6. remicastaing commented on Sep 26, 2014

    @remicastaing
    ContributorAuthor

    @kingcody, I don't have generator branch, just angular-fullstack app branch with login, signup directive.-
    Rémi

    On Fri, Sep 26, 2014 at 2:28 PM, Cody Mize notifications@github.com
    wrote:

    @remicastaing do you have a branch for this? I have a working setup that I'd be happy to share.

    Reply to this email directly or view it on GitHub:
    #552 (comment)

  7. remicastaing commented on Sep 26, 2014

    @remicastaing
    ContributorAuthor
  8. JaKXz commented on Sep 27, 2014

    @JaKXz
    Collaborator

    PRs for this and #457 would be awesome. Does anyone else think that all the components/ should be directives (with the exception of the modal service)?

  9. kingcody commented on Sep 27, 2014

    @kingcody
    Member

    I'd like to share my opinion and hear what others have to say on the matter.

    /app
    This is where the "pages" of the website live; everything that is specific to a particular page goes (somewhere) in here.

    /components
    Any thing that is not specific to a page and/or is reusable goes here.

    That being said, my components folder is typically the larger of the two as I attempt to make most things modular or at least initially plan to reuse them. So I find myself regrouping/reorganizing my component folder quite often when I build a project.

    One thing that I seem to do a majority of the time is create a user folder in components and move the user $resource to there. I also create directives (in there) for the user login form and signup form. Those two directives simply manage the form, the user's input and form validation.

    I realize that it may seem over the top to some and it very well may be for different setups, but what that allows me to do is use the same form on the signup directive as well as the edit user directive (sans styling). I also use the same "auth" form in the login directive as well as my "action" auth directive (I use that for specific actions that require auth on the spot before completion).

    I'm not suggesting that we take such an intricate approach here, but I would like to see the components that are used become more modular and possibly be grouped better.

    Another benefit is that it is much easier to write unit tests for a small modular piece than a large monolithic app; and when something does break ( and it probably will 😄 ) it's not such an ordeal to debug the issue.

    Anyways, those are my thoughts.

  10. remicastaing commented on Sep 27, 2014

    @remicastaing
    ContributorAuthor

    What I have already done is based on PR #444 (replacing ngCookie by ngStorage).

  11. added this to the milestone on Jul 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions