Giter Site home page Giter Site logo

angular-labs's Introduction

Angular Labs

Use the following command to initialize a new project directory

ng new ng-project-name --standalone --style=scss --inline-style --inline-template --skip-git --no-ssr

Install ng-bootstrap

ng add @ng-bootstrap/ng-bootstrap

Generate new component

ng g c component-name

Example output home.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'app-home',
  standalone: true,
  imports: [],
  template: `
    <p>
      home works!
    </p>
  `,
  styles: ``
})
export class HomeComponent {

}

Create route

Example route app.routes.ts:

import { Routes } from '@angular/router';
import { HomeComponent } from './home/home.component';

export const routes: Routes = [
    {
        path: '',
        component: HomeComponent,
        title: 'Home Page'
    }
];

Import and render a child component

Example output home.component.ts:

import { Component } from '@angular/core';
import { HomeListingSelectorComponent } from '../home-listing-selector/home-listing-selector.component';

@Component({
  selector: 'app-home',
  standalone: true,
  imports: [HomeListingSelectorComponent],
  template: `
    <p>
      home works!
    </p>
    <app-home-listing-selector></app-home-listing-selector>
  `,
  styles: ``
})
export class HomeComponent {

}

Reference guide project elements

  1. ng-bootstrap as design system
  2. Top app bar with navigation to 3 routes
    • '/' -> Home
    • '/router' -> Router
    • '/forms' -> Forms

Useful Links

Inputs and Outputs

https://angular.io/guide/inputs-outputs Inputs Outputs https://armenvardanyan.dev/

angular-labs's People

Contributors

dnewingh avatar

Watchers

 avatar  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.