Hi,
I am relatively new to Angular so please excuse the stupid question but I really want to contribute to your excellent project. I have quite a bit of experience writing chat bots and chat end points and want to add the ability to do "quick responses" if the client is talking to a bot. I cannot use your component as-is because Angular strips the button tags and the "onClick=" from the Message.message when you put it into the innerHtml. More on that later...
I have forked your repository to my own GitHub account and cloned it to my local machine. I know how to use npm link to create a symlink from my local ng-chat to my client. I believe that I now need to run ng build ng-chat
but when I try it from the command line in the root directory I get:
C:\development\src\ChatBots\AngularClient\ng-chat>ng build ng-chat
Date: 2018-11-28T21:15:36.323Z
Hash: 9c5150967a8f50ad6392
Time: 14006ms
chunk {main} main.js, main.js.map (main) 657 bytes [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 105 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
ERROR in demo/offline_bot/src/app/app.component.ts(2,29): error TS2307: Cannot find module 'ng-chat'.
demo/offline_bot/src/app/app.module.ts(7,30): error TS2307: Cannot find module 'ng-chat'.
demo/offline_bot/src/app/demo-adapter-paged-history.ts(1,109): error TS2307: Cannot find module 'ng-chat'.
demo/offline_bot/src/app/demo-adapter-paged-history.ts(69,18): error TS2339: Property 'onMessageReceived' does not exist
on type 'DemoAdapterPagedHistory'.
demo/offline_bot/src/app/demo-adapter.ts(1,84): error TS2307: Cannot find module 'ng-chat'.
demo/offline_bot/src/app/demo-adapter.ts(106,18): error TS2339: Property 'onMessageReceived' does not exist on type 'Dem
oAdapter'.
src/spec/ng-chat.component.spec.ts(15,12): error TS2416: Property 'listFriends' in type 'MockableAdapter' is not assigna
ble to the same property in base type 'ChatAdapter'.
Type '() => Observable<User[]>' is not assignable to type '() => Observable<UserResponse[]>'.
Type 'Observable<User[]>' is not assignable to type 'Observable<UserResponse[]>'.
Type 'User[]' is not assignable to type 'UserResponse[]'.
Type 'User' is not assignable to type 'UserResponse'.
Property 'User' is missing in type 'User'.
when I try the same thing from the src/ directory I get:
C:\development\src\ChatBots\AngularClient\ng-chat\src>ng build ng-chat
Date: 2018-11-28T21:16:51.402Z
Hash: 986c8962b77a2394797b
Time: 13871ms
chunk {main} main.js, main.js.map (main) 657 bytes [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 105 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
ERROR in ../demo/offline_bot/src/app/app.component.ts(2,29): error TS2307: Cannot find module 'ng-chat'.
../demo/offline_bot/src/app/app.module.ts(7,30): error TS2307: Cannot find module 'ng-chat'.
../demo/offline_bot/src/app/demo-adapter-paged-history.ts(1,109): error TS2307: Cannot find module 'ng-chat'.
../demo/offline_bot/src/app/demo-adapter-paged-history.ts(69,18): error TS2339: Property 'onMessageReceived' does not ex
ist on type 'DemoAdapterPagedHistory'.
../demo/offline_bot/src/app/demo-adapter.ts(1,84): error TS2307: Cannot find module 'ng-chat'.
../demo/offline_bot/src/app/demo-adapter.ts(106,18): error TS2339: Property 'onMessageReceived' does not exist on type '
DemoAdapter'.
spec/ng-chat.component.spec.ts(15,12): error TS2416: Property 'listFriends' in type 'MockableAdapter' is not assignable
to the same property in base type 'ChatAdapter'.
Type '() => Observable<User[]>' is not assignable to type '() => Observable<UserResponse[]>'.
Type 'Observable<User[]>' is not assignable to type 'Observable<UserResponse[]>'.
Type 'User[]' is not assignable to type 'UserResponse[]'.
Type 'User' is not assignable to type 'UserResponse'.
Property 'User' is missing in type 'User'.
Again, I apologize for the noob question but this is my first attempt to work with a github based project.
Stephen G.