jelbourn / material2-app

Simple app that consumes Angular Material 2 components
650 stars 278 forks source link

Updated to angular-cli v1.0.0 and angular v4.0.0 #38

Open coder925 opened 7 years ago

coder925 commented 7 years ago

Updated to angular-cli v1.0.0-beta.28.3 and angular/material v2.0.0-beta.1.

Steps taken:

npm install --save-dev angular-cli@latest
npm install
ng update

During the update the following file actions were taken:

Created missing folder after update mkdir src\assets

Updated Material according to documentation:

npm install --save @angular/material
npm install --save hammerjs 
npm install --save-dev @types/hammerjs

Updated firebase-tools: npm install --save-dev firebase-tools

Renamed classes to align with file naming and allow for easier angular-cli updates in the future. renamed: MaterialAppModule > AppModule renamed: Material2AppAppComponent > AppComponent

bogste commented 7 years ago

Happy to see that you took the care to do it! I have already done this and was planning a PR.

BTW, how did you get the AoT to work? It looks broken on my side?

coder925 commented 7 years ago

I am glad you appreciate it. Actually, I did not do anything at all regarding AOT. Since I let angular-cli ng updateoverwrite both main.ts and tsconfig.json some previous AOT related code/config was stripped.

I assumed that the app worked since I get no error messages after running ng serve --aot. Please let me know if I have overlooked something. Thanks!

coder925 commented 7 years ago

Updated to angular-cli v1.0.0, angular v4.0.0 and angular/material v2.0.0-beta.2.

Steps taken:

  1. Created a new app using angular-cli.
    ng new M2App
    npm install --save @angular/material
    npm install --save @angular/animations
    npm install --save hammerjs
    npm install --save-dev firebase-tools
  2. Merged the old directory with the new.
  3. Fixed some deprecated syntax in app.component.html and material2-app-theme.scss.
asiftasleem commented 7 years ago

Please merge this PR or upgrade to latest versions.