Material not working in new CLI application
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
Should launch skeleton app from cli
What is the current behavior?
erroring on ng serve command
What are the steps to reproduce?
ng new my-app npm install --save @angular/material
followed every step in this page https://github.com/angular/angular-cli/wiki/stories-include-angular-material
WORKS if i remove MaterialModule from imports in app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { MaterialModule } from '@angular/material';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
// MaterialModule <-- works when removed
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
angular 4.3.1 2.0.0-beta.8 windows 7 TS 2.2.1
Is there anything else we should know?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Why Angular Material is not being installed in my latest ...
Recently I created a new angular application with latest version of Angular: 13.1.1 and I am trying to install angular Material but I'm ......
Read more >Angular | IntelliJ IDEA Documentation - JetBrains
The recommended way to start building a new Angular application is Angular CLI, which IntelliJ IDEA downloads and runs for you using npx....
Read more >CLI Overview and Command Reference - Angular
If the current working directory is not the right place for your project, ... The initial application created by the ng new command...
Read more >Angular Material Installation - Javatpoint
Install the Angular CLI by using npm: npm install -g @angular/cli ... Create a workspace: ng new angular-material-app ... The add command will...
Read more >Learn Angular Material - Full Tutorial - YouTube
Learn how to use Angular Material in this full tutorial course for beginners. Angular Material is a UI component library for Angular JS ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try this way without npm. Its working fine for me.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.