Development Server
Angular Bases uses the Angular CLI development server with hot module replacement for a fast development experience.Quick Start
Available npm Scripts
Frompackage.json, the following scripts are available:
Development Scripts
Watch Mode
Angular CLI
Development Server Options
The Angular development server supports several useful options:Custom Port
Open Browser Automatically
Specific Host
Production Configuration
Hot Module Replacement
The development server includes hot module replacement (HMR), which means:- Changes to TypeScript files automatically recompile
- The browser refreshes to show your changes
- Component state can be preserved during updates
- Styles update without a full page reload
The Angular CLI’s development server uses the
@angular/build:dev-server builder configured in angular.json. The default configuration is set to development mode.Development Workflow
Debugging Tips
Browser DevTools
With source maps enabled (default in development), you can:- Set breakpoints in your TypeScript files
- Inspect component state and properties
- Monitor network requests
- View console logs and errors
Angular DevTools
Install the Angular DevTools browser extension for:- Component tree inspection
- Change detection profiling
- Dependency injection hierarchy
- Performance profiling
Console Output
The development server displays:- Compilation status and errors
- Build time information
- File change notifications
- Warning and error messages
TypeScript Errors
TypeScript compilation errors appear in:- The terminal running the dev server
- Your code editor (if configured)
- Browser console (for runtime errors)
The project uses strict TypeScript settings. This catches more errors at compile time but may require more explicit type annotations.
File Watching
The development server watches these file types:- TypeScript files (
.ts) - HTML templates (
.html) - CSS/SCSS styles (
.css,.scss) - Angular configuration files
Excluded from Watching
node_modules/- Build output directories
- Test files (unless running tests)
Configuration Files
Key files affecting development:- angular.json - Dev server configuration at
projects.bases.architect.serve - tsconfig.app.json - TypeScript compilation settings
- package.json - npm scripts and dependencies
Next Steps
After setting up development:- Learn about building for production
- Set up testing
- Understand the project structure