Skip to content

Multiple entry points with ng serve #6428

@jraadt

Description

@jraadt

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ x] feature request

Versions.

@angular/cli: 1.0.4
node: 7.9.0
os: darwin x64
@angular/animations: 4.1.3
@angular/common: 4.0.2
@angular/compiler: 4.0.2
@angular/core: 4.0.2
@angular/forms: 4.0.2
@angular/http: 4.0.2
@angular/material: 2.0.0-beta.5
@angular/platform-browser: 4.0.2
@angular/platform-browser-dynamic: 4.0.2
@angular/router: 4.0.2
@angular/cli: 1.0.4
@angular/compiler-cli: 4.0.2

Desired functionality.

Is it possible to have multiple entry points available from ng serve? I'm building an application that has multiple urls. My main app is index.html and is working great. I would like to add a minimal mobile version of my app with reduced functionality at mobile.html that shares a lot of the code, but I don't want to load all the features used in my main app. So along with main.ts I would like to create a mobile.ts that bootstraps my MobileModule instead of AppModule if mobile.html is called instead of index.html. I just want to call ng serve on my project and have it use the different entry points depending on if I call index.html or mobile.html. Is that possible or do I have to eject?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions