Found the solution for this issue, Here is the solution
Add the below code in to
1. In app.component.js import Tableau js file
Ex: import '../assets/libs/tableau-2.1.2.min.js';
2. In Dashboard.component.js create a tableau variable
Ex: declare var tableau: any;
the above solution fixed my issue.
Do you have to provide the api path in both .angular-cli.json & app.component.ts or only in app.compoent.ts?
Imports in app.component.ts seems to look for the api under "src\app" folder irrespective of where the library is stored and what path you provide in the [scripts].
I can get this working only by providing in index.html & no other place and nor do I have to import ONLY if I provide the path to Tableau server.. But if I try to reference to local path, I get error. I want to refer to the local copy, Since my intention is to use dev version tableau extension library which is not in server.