Closed nowrap closed 7 years ago
You should not declare GaugeLabel nor GaugeSegment in your module, only where you're gonna use it.
Also if you are using system.js you should map it there too.
That's the only thing I see wrong right now.
Thx for your answer. A system.js i don't have.
I redirected the question to the ionic forum. Maybe it's an ionic specific "mapping" thing.
Perfect, just let me know
Today, it worked ...
Only the gauge.component.scss couldn't be loaded. I had to copy it to the www directory.
Unhandled Promise rejection: Failed to load gauge.component.scss ; Zone: <root> ; Task: Promise.then ; Value: Failed to load gauge.component.scss undefined
It's weird. I'll check again in my code if scss is loading
I can confirm it's working
@nowrap @subarroca Can you guys post a full example? I'm having trouble getting it to work too
Here's my error that I am getting:
Uncaught Error: Module build failed: TypeError: Cannot read property 'content' of undefined
at Object.typescriptSourcemapLoaderMemory
Hi @Tyler-Darby could you specify the version of angular you're using and if it's combined with ionic?
@subarroca I got it working, It was excluded in my tsconfig.json for some reason, all good now. Awesome little component you've got here 👍
@Tyler-Darby hi, Having the same problem, "Cannot read property 'content' of undefined", how do you solve that, thanks.
@zjw1918 Are you using Ionic?
I made this tweak to my tsconfig.json
file.
"include": [
"src/**/*.ts",
"node_modules/ng2-kw-gauge/index.ts"
],
Thanks @Tyler-Darby
Hello, i am trying to use the module in my ionic 2 app.
I've installed it according the docs:
npm install ng2-kw-gauge -S
In the app.module.ts i added:
import { GaugeModule, GaugeSegment, GaugeLabel } from 'ng2-kw-gauge';
@NgModule({ imports: [ IonicModule.forRoot(MyApp), GaugeModule, GaugeSegment, GaugeLabel ],
The template.html looks like:
<ng2-kw-gauge></ng2-kw-gauge>
But i get a browser error:
Error: Cannot find module "ng2-kw-gauge"
Maybe someone can point me in the correct direction what i'am doing wrong?