node.js - Using Node Module in Angular 2 -
i learning angular 2 , trying build mobile app using ionic 2 rc0 uses angular 2 , typescript. trying use node module woocommerce-api in app getting errors.
i installed module using npm.
npm install --save woocommerce-api
then in .ts file, trying import this,
import * wc '../../../node_modules/woocommerce-api'
although vs code not display errors still cannot use in methods , constructor. don't mind not getting intellisense want make module work.
any highly appreciated. in advance.
ps: there no typings available this module.
net
node.js module not avalible in browser, , cannot found reason. if take @ repo simple wrapper.
it best create new service in angular , call api directly angulars http.
Comments
Post a Comment