angular-cli


Setting up tether-drop to work with angular-cli#1.0.0-beta.24


I'm having difficulty figuring out how to setup tether-drop with my angular 2 app created with angular-cli#1.0.0-beta.24.
Steps to reproduce:
Create a new project with the angular-cli.
ng new tester --skip-git
Follow the angular-cli instructions for installing third party library:
npm install tether-drop --save
npm install #types/tether-drop --save
At this point I fully expect to be able to use the following line in app.component.ts
import { Drop } from 'tether-drop';
But when I ng serve the result is this error:
ERROR in ./src/app/app.component.ts
Module build failed: Error: D:/Visual Studio Code/tester/src/app/app.component.ts (3,10): Module '"D:/Visual Studio Code/tester/node_modules/#types/tether-drop/index"' has no exported member 'Drop'.)
at _checkDiagnostics (D:\Visual Studio Code\tester\node_modules\#ngtools\webpack\src\loader.js:116:15)
at D:\Visual Studio Code\tester\node_modules\#ngtools\webpack\src\loader.js:141:17
# ./src/app/app.module.ts 14:0-47
# ./src/main.ts
# multi main
I have struggled mightily with integrating third party libraries into angular-cli generated projects (webpack). I managed to get some of them working but a solution for this one is alluding me.
Can someone please enlighten me and remove this burden of ignorance from me?
It seems that you need to change your import to:
import * as Drop from 'tether-drop';
And then you can use it as per the README:
const dropInstance = new Drop({
/* options here */
});

Related Links

AngularCli: disable minification
Angular Cli e2e element explorer not responding
Angular cli generate a service and include the provider in one step
Angular-cli not generating dist directory with ng build
How to update service json or array value on click in angular2?
How to revert from Angular-cli to Angular without cli for server-side rendering with Angular Universal
How to change file index outside the root
angularCLI Access-Control-Allow-Origin Multiple Origin Domains
Angular CLI how to merge json files
Angular CLI (ng) use single instead of double quotes
can't install angular cli on ubuntu 16.04
How to solve No 'Access-Control-Allow-Origin' header is present on the requested resource with angular 2 service written with angular-cli?
Usage of watch parameter in eject command of Angular CLI
Serving and testing a bundle after ng build
routerLink stopped working in #angular/cli
How to run Angularcli project with https

Categories

HOME
sharepoint
sql-server
itext
scipy
performancecounter
rebol
sudo
constructor
lagom
dlib
symfony-forms
react-leaflet
factor-analysis
thumbnails
ghost-inspector
http-method
samsung-mobile
skmaps
unpack
owl-api
ggmap
multichoiceitems
superscript
hibernate-cache
fractals
shapes
division
nlb
es-shell
haskell-pipes
sendgrid-templates
pdftk
service-fabric-stateful
resuming-training
startapp
taskmanager
uiviewpropertyanimator
mcrypt
quintus
communication-protocol
libreadline
windows-azure-pack
mongoskin
selecteditem
mpeg-4
xmp
cmocka
wif
rx-groovy
debian-based
adodb
python-ggplot
tilestache
method-overriding
getimagedata
coin-flipping
visual-studio-addins
nservicebus4
swrl
gridworld
mstsc
cgimageref
sharpmap
fraud-prevention
fluidsynth
sametime
domain-calculus
ninject-extensions
visual-web-gui
viewdidload
emacs23
mysql-error-1045
ajax.beginform
throttling
testunit
ets
dashcode
hardware-acceleration
surefire
external-assemblies
google-instant
pci-bus
scatterview
dotproject

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App