-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Angular-Material2 doesn't work with ngUpgrade #1571
Comments
To prevent some misunderstanding, here is a piece of code of which I used to load Material components: import { MdButtonModule } from '@angular2-material/button';
import { MdInputModule } from '@angular2-material/input';
import { MdCheckboxModule } from '@angular2-material/checkbox';
// Some lines skipped...
@NgModule({
declarations: [
DisplayNamePipe,
UninvitedPipe,
PartyDetails,
PartyUninvited
],
imports: [
BrowserModule,
FormsModule,
MdButtonModule.forRoot(),
MdInputModule.forRoot(),
MdCheckboxModule.forRoot()
]
})
class AppNg2Module {}
const adapter = new UpgradeAdapter(AppNg2Module);
// Some lines skipped...
function onReady() {
adapter.bootstrap(document, [SociallyNg1Module.name]);
} |
You are using an outdated version of material2, might want to try with the latest version. https://github.com/angular/material2/blob/master/CHANGELOG.md#breaking-changes |
@fxck Unfortunately I encountered a second issue thanks to that update. Apparently there is an unregistered peer dependency of
Unless manually installed. Any more suggestions? |
https://github.com/angular/material2/blob/master/package.json#L30 try clearing your node_modules and doing a fresh |
Fixed in #1579, will be part of the next release. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Angular-Material2 doesn't work with ngUpgrade
Hello fellows, I've been recently working on a project I'm contributed to, you can find it here. The last part of this tutorial involves migration from Angular1 to Angular2, which requires me to use the UpgradeAdapter provided by ngUpgrade. Unfortunately, once importing the modules provided by Angular-Material2 and bootstrapping the app I receive the following error:
For me it seems like a compatibility issue since I'm also contributed to a similar project but purely based on Angular2 and I don't receive the error mentioned above. You can find it here. I tried to look for similar issues but non of them involves the usage of ngUpgrade. Hopefully I didn't do anything wrong, your'e more than welcome to take a look at the project, any help would be appreciated :-)
The text was updated successfully, but these errors were encountered: