-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting ERROR in UiSwitchModule is not an NgModule #7
Comments
Just a note, this is actually working, I am just wondering about the error. |
same here and it brakes lazily loaded modules. |
It was working yesterday, and today, for some reason, ng-cli dead refuses to compile the app, with this error :
|
I am getting this same error anyone manage to resolve it? |
I have found a fix for this this issue you need to point the path to the src folder like this and it works :) import { UiSwitchModule } from '../../node_modules/angular2-ui-switch/src'; |
it's not working for me. Any other way? |
can't work for me either, who can help to update it ? ???? |
I found using @daominhsangvn solution worked like a charm, prob should get merged in |
+1 |
I have found a fix for this this issue you need to point the path to the src folder like this and it works :) import { UiSwitchModule } from '../../node_modules/angular2-ui-switch/dist/index.d'; |
Mine used to compile, but wouldn't build with the --prod --aot flags. The suggestion to use import { UiSwitchModule } from '../../node_modules/angular2-ui-switch/dist/index.d'; doesn't help me. Seems like it works with a specific module versions or something. Any ideas? I really don't want to pull out the switch as it looks so nice ^_^ |
Was there ever a resolution to this? |
@brianeletype , Try this library. https://github.com/webcat12345/ngx-ui-switch |
I did and I oddly got the same error. |
Could you please create issue on my repository so I can check and update package? |
That fixed it |
Still not fixed. Don't waste your time with it |
Not working for Angular (Angular 4) |
@TeodorKolev , Did you tried ngx-ui-switch? |
@webcat12345 yes, and btw I do not see any difference. Problem is in component. |
@webcat12345 you can do pull request or fork, instead of steal people code and post it like your own |
Actually, I fixed AoT error of angular2-ui-switch and integrated with Angular4. Then please wait for your pull request merged. |
@webcat12345 all you did is to add "/src". Good job. And it is not working with Anuglar 4 |
What error you got? Just tried with new Angular-cli project and it works. |
|
Did you imported module correctly?
You should add these code to the module where you want to use. |
Today I started to test the ngx-ui-switch and ran into the same error as described above. |
I personnaly had the exact same error because of a missing semicolomn.
|
import { UiSwitchModule } from '../../../node_modules/angular2-ui-switch/src/index'; |
For me i am using Angular 4, sometimes it works perfectly but other times without any change it stops! |
@webcat12345 - This https://github.com/webcat12345/ngx-ui-switch worked for me. Thank you! |
Doesn't work for angular 4 :( |
|
At runtime, I am always getting:
ERROR in UiSwitchModule is not an NgModule
I have:
import {UiSwitchModule } from 'angular2-ui-switch'
and:
imports: [
BrowserModule,
ReactiveFormsModule,
FormsModule,
HttpModule,
routing,
Ng2BootstrapModule,
UiSwitchModule,
],
The text was updated successfully, but these errors were encountered: