Giter Club home page Giter Club logo

simple-angular-app's Introduction

Simple Angular App

Simple Boiler plate for Angular App

Angular Notes:

Installation:

  1. Install node
    • Download Node.js Installer

    • Verify Installation after installation is complete:

	node -v
- Update Node with latest version:
	npm install -g npm
  1. The Angular CLI
    npm install -g @angular/cli
  1. Create a New Project:
    ng new "my-new-angular-app"
    # options for enable routing : y
    cd "my-new-angular-app"

Note: if errors in installing all packages do npm i to install all dev packages locally 4. Run Angular locally at http://localhost:4200/:

    ng serve

Add new pages:

# ng g component my-new-component #alias-name
ng g component page-one

Load page-one component in the home page

  • add path to routes in app-routing.module.ts
import { PageOneComponent } from './page-one/page-one.component';
-----
const routes: Routes = [
  { path: 'page-one', component: PageOneComponent },
];
  • add navigational link to app.component.html
<h1>Angular Router App</h1>
<!-- This nav gives you links to click, which tells the router which route to use (defined in the routes constant in  AppRoutingModule) -->
<nav>
  <ul>
    <li><a routerLink="/page-one" routerLinkActive="active">Page One</a></li>
  </ul>
</nav>
<!-- The routed views render in the <router-outlet>-->
<router-outlet></router-outlet>

simple-angular-app's People

Contributors

sarathchandrac avatar

Watchers

 avatar James Cloos avatar

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.