webcat12345 / ngx-ui-switch

Angular UI Switch component
https://webcat12345.github.io/ngx-ui-switch/demo/
MIT License
110 stars 68 forks source link

Problem with angular universal #168

Closed alyeldegwy closed 6 years ago

alyeldegwy commented 7 years ago

/home/XXX/Projects/XXXX/node_modules/ngx-ui-switch/src/index.ts:1 (function (exports, require, module, filename, dirname) { import { NgModule } from '@angular/core'; ^^^^^^

SyntaxError: Unexpected token import at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Module._extensions..js (module.js:579:10) at Object.require.extensions.(anonymous function) [as .ts] (/home/XXX/Projects/XXXX/node_modules/ts-node/src/index.ts:376:14) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19)

cmckni3 commented 6 years ago

Should be fixed in PR. I am sure the problem is related to not being built using ngc (angular/compiler angular/compiler-cli).