Code Monkey home page Code Monkey logo

angular-sample-code's Introduction

Codecraft Angular Examples

All the examples in this repository were generated with Angular CLI version 6.0.8. Check the respective tutorial from codecraft.tv

Examples Live Preview on Stackblitz

To run the examples on stackblitz, respective example url can be:

stackblitz.com/github/{GH_USERNAME}/{REPO_NAME}/tree/{TAG|BRANCH|COMMIT}

e.g.

https://stackblitz.com/github/codecraftpro/angular-sample-code/tree/master/12.routing/2.route-configuration

To Run Locally

To run the examples locally, clone the repository & in any example directory first do npm install then use below angular cli commands to run/debug the example app.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

angular-sample-code's People

Contributors

shant24k avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

angular-sample-code's Issues

Error serving one of the examples. No NgModule metadata found for 'AppModule'

Hi!

Summary
I just want to run the example in /angular-sample-code/12.routing/6.router-guards but after installing the dependencies and executing the command ng serve I receive the error No NgModule metadata found for 'AppModule'.

Steps to reproduce

  1. Download the repo at https://github.com/codecraft-tv/angular-sample-code.
  2. Go to the below directory: /angular-sample-code/12.routing/6.router-guards.
  3. Execute npm install.
  4. Execute ng serve.

What is the current bug behavior?
After the last of the steps, I receive this error:
No NgModule metadata found for 'AppModule'
and the application can not be correctly served.

What is the expected correct behavior?
Correctly serve the application.

Relevant logs and/or screenshots
This is the complete output of the command ng serve.

Your global Angular CLI version (8.3.12) is greater than your local
version (6.0.8). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
 10% building modules 6/6 modules 0 activeℹ 「wds」: Project is running at http://localhost:4200/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: 404s will fallback to //index.html
                                                                                          
Date: 2020-01-17T12:02:05.553Z
Hash: cb595c67827afba0e932
Time: 2424ms
chunk {main} main.js, main.js.map (main) 355 kB [entry] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 354 kB [entry] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 464 kB [entry] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 5.5 kB [initial] [rendered]

ERROR in No NgModule metadata found for 'AppModule'.
ℹ 「wdm」: Failed to compile.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.