Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am using angular 4 in a .Net project in VS 2015 and the getting the following error message when application loads in the browser :
HTML
<pre>Error: (SystemJS) Unexpected token <
	SyntaxError: Unexpected token <
	    at eval (<anonymous>)
	    at Object.eval (http://localhost:41053/src/app/chat/chat-dialog.component.js:11:27)
	    at eval (http://localhost:41053/src/app/chat/chat-dialog.component.js:54:4)
	    at eval (http://localhost:41053/src/app/chat/chat-dialog.component.js:55:3)
	Evaluating http://localhost:41053/src/api-ai-javascript
	Evaluating http://localhost:41053/src/app/chat/chat-dialog.component.js
	Evaluating http://localhost:41053/src/app/app.module.js
	Evaluating http://localhost:41053/src/main.js
	Error loading http://localhost:41053/src/main.js
	    at eval (<anonymous>)
	    at Object.eval (http://localhost:41053/src/app/chat/chat-dialog.component.js:11:27)
	    at eval (http://localhost:41053/src/app/chat/chat-dialog.component.js:54:4)
	    at eval (http://localhost:41053/src/app/chat/chat-dialog.component.js:55:3)
	Evaluating http://localhost:41053/src/api-ai-javascript
	Evaluating http://localhost:41053/src/app/chat/chat-dialog.component.js
	Evaluating http://localhost:41053/src/app/app.module.js
	Evaluating http://localhost:41053/src/main.js
	Error loading http://localhost:41053/src/main.js



the error points out at this line in .js file :

"
Quote:
var api_ai_javascript_1 = require("api-ai-javascript");
"

however if i run the same code using ng serve in an angular app(not using visual studio) then it works fine.

My question is : how to use( or configure) "api-ai-javascript" in angular 4 in .Net project ?

What I have tried:

I have read articles about creating a chatbot in angular using npm but havn;t got anything related to configuration to use "api-ai-javascript" module in angular inside a .Net application.

Please let me know if I'm missing any step to configure properly.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900