angular-website-example icon indicating copy to clipboard operation
angular-website-example copied to clipboard

:clipboard: Namari website converted from HTML template to Angular

:zap: Angular Website Example

  • Converts a free Namari HTML template to an Angular app
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

:page_facing_up: Table of contents

  • :zap: Angular Website Example
    • :page_facing_up: Table of contents
    • :books: General info
    • :camera: Screenshots
    • :signal_strength: Technologies
    • :floppy_disk: Setup
    • :computer: Code Examples
    • :cool: Features
    • :clipboard: Status & To-Do List
    • :clap: Inspiration
    • :file_folder: License
    • :envelope: Contact

:books: General info

  • Includes code from AdMISTER STUDIOs - see :clap: Inspiration below, but with changes to reduce lines of code and use latest Angular version. Some of the videos listed below are not applicable as I decided to just reproduce the Namari website and not include a blog, user login/logoff, auth guard, separate API etc.
  • Angular feature modules used for organisational best practise
  • Single service used to fetch data for all pages so this data can be accessed from an API. This meant I could not use custom interface classes. Each module should have its own service with interface class.

:camera: Screenshots

Example screenshot.

:signal_strength: Technologies

:floppy_disk: Setup

  • Run npm i to install dependencies.
  • 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.

:computer: Code Examples

  • shared/services/config.service.ts function to get data from API with inputs: database name and id
getSettings(database: string, id?: number): Observable<any> {
  let url = id? `api/${database}/${id}` : `api/${database}`;
  return this.http.get<any>(url).pipe(
    catchError(this.handleError(`Error getting data from ${database}`, []))
  );
}

:cool: Features

  • Lazy-load modules used for most pages to speed up initial rendering of home page

:clipboard: Status & To-Do List

  • Status: Working
  • To-Do: Remove unused CSS. Create separate service for each module?

:clap: Inspiration

:file_folder: License

  • N/A

:envelope: Contact