cornflourblue / angular-7-role-based-authorization-example

Angular 7 - Role Based Authorization Example with Webpack 4
http://jasonwatmore.com/post/2018/11/22/angular-7-role-based-authorization-tutorial-with-example
MIT License
105 stars 110 forks source link

ReferenceError: config is not defined #1

Closed m-n9 closed 5 years ago

m-n9 commented 5 years ago

image

Added the code as it is to my project. I didn't have the typing.d.ts file pre-installed so created it manually and defined Config there but when ng serve the project and go to the login page enter credentials click on Login. I get the following error:

LoginComponent.html:6 ERROR ReferenceError: config is not defined at AuthenticationService.push../src/app/auth/_services/authentication.service.ts.AuthenticationService.login (authentication.service.ts:23) at LoginComponent.push../src/app/login/login.component.ts.LoginComponent.onSubmit (login.component.ts:51) at Object.eval [as handleEvent] (LoginComponent.html:6) at handleEvent (core.js:10251) at callWithDebugContext (core.js:11344) at Object.debugHandleEvent [as handleEvent] (core.js:11047) at dispatchEvent (core.js:7710) at core.js:9190 at SafeSubscriber.schedulerFn [as _next] (core.js:3563) at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:195)

cornflourblue commented 5 years ago

This project doesn't use angular cli, it uses webpack directly. To start run the command npm start