Giter Site home page Giter Site logo

cornflourblue / angular2-registration-login-example Goto Github PK

View Code? Open in Web Editor NEW
430.0 39.0 388.0 78 KB

Angular 2/5 User Registration and Login Example

Home Page: http://jasonwatmore.com/post/2016/09/29/angular-2-user-registration-and-login-example-tutorial

License: MIT License

CSS 0.26% HTML 27.38% TypeScript 66.26% JavaScript 6.09%
angular-boilerplate angular2-registration-login angular2 angular2-boilerplate

angular2-registration-login-example's Introduction

angular2-registration-login-example's People

Contributors

cornflourblue 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular2-registration-login-example's Issues

property success does not exist in type Response

this.authService.authenticateUser(user).subscribe(data => {
if (data.success){
this.authService.storeUserData(data.token, data.user);
this.flashMessages.show('You are now logged in',{ cssClass: 'alert-success', timeout:5000});
this.router.navigate(['/dashboard']);
} else {
this.flashMessages.show(data.msg, { cssClass: 'alert-danger', timeout:5000});
this.router.navigate(['/login']);
}

 });

i later changed it to
if (data['success']){.............
but while login it is going to dashboard even if the password or username is wrong...

nodejs 10.5.0
angular2

Alert Services

Hi Alert services is not working , I tried to dig out but unable to fix it.. I am new in angular2 , so please look in it.

import { Component, OnInit } from '@angular/core';
import { AlertService } from './../services/index';

@component({
moduleId: module.id,
selector: 'alert',
templateUrl: 'alert.component.html',
providers: [AlertService],
})

export class AlertComponent implements OnInit {
private message: any;

constructor(private _alertService: AlertService) {}
ngOnInit() {
    this._alertService.getMessage().subscribe(message => { 
        alert(message);  // on error this is not executing
    	this.message = message; 
    });
}

}

fresh install npm start fails

Node -v = v6.10.2
NPM -v = 5.0.3

NPM Install Warning

$ npm install
npm WARN deprecated [email protected]: Use uuid module instead

> [email protected] install /Users/peter/angular2-registration-login-example/node_modules/fsevents
> node install

[fsevents] Success: "/Users/peter/angular2-registration-login-example/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm notice created a lockfile as package-lock.json. You should commit this file.
added 458 packages in 21.754s

NPM Start Error

> $ npm start
> [email protected] start /Users/peter/angular2-registration-login-example
> tsc && concurrently "npm run tsc:w" "npm run lite"

node_modules/rxjs/Subject.d.ts(16,22): error TS2415: Class 'Subject<T>' incorrectly extends base class 'Observable<T>'.
  Types of property 'lift' are incompatible.
    Type '<R>(operator: Operator<T, R>) => Observable<T>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<R>'.
      Type 'Observable<T>' is not assignable to type 'Observable<R>'.
        Type 'T' is not assignable to type 'R'.
node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(24,22): error TS2415: Class 'WebSocketSubject<T>' incorrectly extends base class 'AnonymousSubject<T>'.
  Types of property 'lift' are incompatible.
    Type '<R>(operator: Operator<T, R>) => WebSocketSubject<R>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<T>'.
      Type 'WebSocketSubject<R>' is not assignable to type 'Observable<T>'.
        Types of property 'operator' are incompatible.
          Type 'Operator<any, R>' is not assignable to type 'Operator<any, T>'.
            Type 'R' is not assignable to type 'T'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Alert Services

Alert service not working properly can't find the problem.

Doesn't work for me

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 silly lifecycle [email protected]
prestart: no script for prestart, continuing
7 info lifecycle [email protected]start: [email protected]
8 verbose lifecycle [email protected]
start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\mdonner\Documents\esportify\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\SysWOW64\Empirum;C:\Program Files\PuTTY;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Enterprise Vault\EVClient;C:\Program Files\nodejs;C:\Users\mdonner\AppData\Local\Microsoft\WindowsApps;C:\Users\mdonner\AppData\Local\atom\bin;C:\Users\mdonner\AppData\Roaming\npm
10 verbose lifecycle [email protected]
start: CWD: C:\Users\mdonner\Documents\esportify
11 silly lifecycle [email protected]start: Args: [ '/d /s /c',
11 silly lifecycle 'tsc && concurrently "npm run tsc:w" "npm run lite" ' ]
12 silly lifecycle [email protected]
start: Returned: code: 2 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: tsc && concurrently "npm run tsc:w" "npm run lite"
14 verbose stack Exit status 2
14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:886:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd C:\Users\mdonner\Documents\esportify
17 error Windows_NT 10.0.14393
18 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
19 error node v6.10.3
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error [email protected] start: tsc && concurrently "npm run tsc:w" "npm run lite"
22 error Exit status 2
23 error Failed at the [email protected] start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the angular2-registration-login-example package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error tsc && concurrently "npm run tsc:w" "npm run lite"
23 error You can get information on how to open an issue for this project with:
23 error npm bugs angular2-registration-login-example
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls angular2-registration-login-example
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

ng serve is not working

Versions of @angular/compiler-cli and typescript could not be determined.
The most common reason for this is a broken npm install.

Please make sure your package.json contains both @angular/compiler-cli and typescript in
devDependencies, then delete node_modules and package-lock.json (if you have one) and
run npm install again.

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.