Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

200 total results found

Build & Deployment

Frontend Development guidelines

Build Configuration Angular build configuration in angular.json: Project Name: project (generic name) Output Directory: dist/agent Source Root: src Build Commands Development Build npm run build-dev # Creates development build with source maps # Output: dist/a...

Development guide

Frontend Development guidelines

Code Style TypeScript Use TypeScript strict mode Define interfaces for all data structures Use type annotations for function parameters and returns Angular Follow Angular style guide Use Angular CLI for scaffolding One component per file Use services for bu...

Troubleshooting

Frontend Development guidelines

Common Issues 1. Cannot connect to API Symptom: API calls fail with connection errors Solution: Check API endpoints in src/app/addrezz.ts Verify API server is running Check CORS configuration on API server Verify network connectivity 2. Authentication fails...

Additional Resources

Frontend Development guidelines

Official Documentation Angular Documentation TypeScript Documentation RxJS Documentation Angular Material Bootstrap Documentation Leaflet Documentation Useful Tools Angular CLI Visual Studio Code (Recommended IDE) Angular Language Service (V...

Project Overview

Frontend Introduction

OnMarket Landing is a comprehensive Angular-based e-commerce marketplace application. It provides a full-featured online shopping platform with product browsing, cart management, checkout, user profiles, affiliate program, and real-time chat functionality. Key...

Installation and setup

Frontend Introduction

Prerequisites Before you begin, ensure you have the following installed: Node.js: v12.x or higher (recommended v14.x or v16.x) npm: v6.x or higher (comes with Node.js) Angular CLI: v12.2.2 npm install -g @angular/cli@12.2.2 Installation & Setup 1. Clon...

Project structure

Frontend Introduction

on-market-landing/ ├── e2e/ # End-to-end tests ├── src/ │ ├── app/ │ │ ├── components/ # All UI components │ │ │ ├── accounts/ # Login, signup, profile │ │ │ ├── affiliate/ # Affiliate program...

Core features

Frontend Introduction

1. E-Commerce Functionality Product catalog browsing Advanced search and filtering Product details with images and specifications Shopping cart management Checkout process with multiple payment options Order tracking and history 2. User Management User regi...

Architecture & Design Patterns

Frontend Development guidelines

Component-Based Architecture The application follows Angular's component-based architecture where each feature is encapsulated in its own component with clear responsibilities. Modular Design Feature Modules: Components are organized by feature Shared Modul...

Services & API Integration

Frontend Development guidelines

ApiService (api.service.ts) The main service handling all API communications. Base URLs // Production BASEURL = "https://onmarket.id/"; API_USERSTATE_SERVER = "https://usapi.onindonesia.id/"; API_USERONDELIVERY_SERVER = "https://onapps-api.onindonesia.id/"; AP...

Routing Structure

Frontend Development guidelines

Main Routes The application uses Angular Router with the following main routes: // Home & Product Routes { path: "", component: HomePageComponent } { path: "search", component: SearchResultComponent } { path: "product", component: ProductDetailsComponent } { p...

State Management

Frontend Development guidelines

BehaviorSubjects The application uses RxJS BehaviorSubjects for state management: ApiService State isUpdateCart = new BehaviorSubject(true); deletedFromCart = new BehaviorSubject(true); login = new BehaviorSubject(true); SocketsService State private chatOpenS...

Authentication & Security

Frontend Development guidelines

JWT Authentication The application uses JWT (JSON Web Token) for authentication: Login Flow: // User logs in this.apiService.getUser(username, password).subscribe( response => { // Store JWT token localStorage.setItem('jwt', response.token); //...

Key Components

Frontend Development guidelines

1. Homepage Component Path: src/app/components/homepage/ Main landing page featuring: Banner slider Product categories Featured products Promotions Flash sales 2. Product Details Component Path: src/app/components/product-details/ Displays detailed product i...

Custom Pipes

Frontend Development guidelines

1. PhoneNumberPipe File: src/app/pipes/phone-number.pipe.ts Formats phone numbers according to Indonesian format. Usage: {{ phoneNumber | phoneNumber }} 2. ShortNumberPipe File: src/app/pipes/short-number-pipe.pipe.ts Converts large numbers to shortened forma...

Development Workflow

Frontend Development guidelines

Starting Development Server # For Unix/Linux/Mac npm start # For Windows npm run startWindows The app will automatically reload when you make changes to source files. Code Scaffolding Generate new components, services, etc. using Angular CLI: # Generate a ne...

Build & Deployment

Frontend Development guidelines

Development Build npm run build Production Build ng build --configuration production Build Configuration Configured in angular.json: { "configurations": { "production": { "fileReplacements": [{ "replace": "src/environments/environment.ts"...

Testing

Frontend Development guidelines

Unit Tests Run unit tests via Karma: npm test Tests are written using Jasmine and located alongside components: *.spec.ts files End-to-End Tests Run e2e tests via Protractor: npm run e2e E2E tests are located in the e2e/ directory. Test Configuration Ka...

Code Style & Conventions

Frontend Development guidelines

TypeScript Style Guide Follow Angular's TypeScript style guide: Use 2 spaces for indentation Use single quotes for strings Use camelCase for variables and functions Use PascalCase for classes and interfaces Use UPPER_CASE for constants Component Structure @C...

Troubleshooting

Frontend Development guidelines

Common Issues and Solutions 1. OpenSSL Error on npm start Error: Error: error:0308010C:digital envelope routines::unsupported Solution: The project already includes the fix in package.json: NODE_OPTIONS='--openssl-legacy-provider' ng serve 2. Module Not Found...