Skip to content

ng serve --poll #10559

Closed
Closed

Description

@buu700

Was the --poll flag removed in v6, or is that just an error in the newly committed docs? As per #5212 it's needed to support Docker on Windows, which is still the case as far as I'm aware.

Activity

  1. filipesilva commented on May 1, 2018

    @filipesilva
    Contributor

    @buu700 it's still there, but it is a build option and not a serve option. If you add it to projects.project-name.architect.build.options.poll it should work. I tried it on a new project modifying templates and ts files with a 10000ms poll and saw rebuilds.

  2. buu700 commented on May 1, 2018

    @buu700
    ContributorAuthor

    Got it, thanks! It'd be easier to use as a command line flag since our serve script conditionally adds it based on whether the host OS is Windows, but not a blocker since copying and transforming angular.json is an option too.

  3. filipesilva commented on May 1, 2018

    @filipesilva
    Contributor

    You can create a configuration that contains poll, and conditionally use that:

    "build": {
      ...
      "configurations": {
        "docker": {
          "poll": 2000
    

    Then use that one on serve. WDYT? Or maybe poll should be on serve as well, as we do have some duplicated options there.

  4. added this to the v6.0.0 milestone on May 1, 2018
  5. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on May 1, 2018
  6. buu700 commented on May 1, 2018

    @buu700
    ContributorAuthor

    Ah, that could possibly work. Would I be able to stack that with another configuration, like --configuration beta --configuration docker (as I understand, --configuration now replaces --environment?), or would I need to make two different versions of beta in this case?

  7. filipesilva commented on May 1, 2018

    @filipesilva
    Contributor

    We're adding it to dev-server on angular/devkit#822, but I would like to mention that configuration extensibility/composability is on the radar. ATM there is neither.

  8. buu700 commented on May 1, 2018

    @buu700
    ContributorAuthor

    Awesome, thanks! So that will add --poll back to the serve command?

  9. filipesilva commented on May 1, 2018

    @filipesilva
    Contributor

    Yeap, it should be on the next release of @angular-devkit/build-angular!

  10. hbarve1 commented on Sep 26, 2018

    @hbarve1

    poll option is still not available in @angular/cli@6.2.3 serve!

    is there any other way to enable poll option?

  11. rogusdev commented on Nov 19, 2018

    @rogusdev

    The new option is better than the old: it takes an argument for the milliseconds time to wait between polls. (You can see this in the commit referenced above.) However, if you simply pass --poll it has no default so it appears as if it is not working...

    ng serve --host 0.0.0.0 --poll 200
    

    ^ Works as expected in vagrant on win10 host

    ng serve --host 0.0.0.0 --poll
    

    ^ Does no polling, so perhaps a sensible default should be added? 500 or 1000 ms?

  12. maroom1 commented on Aug 20, 2019

    @maroom1

    I am new to this option, when do you use this poll.. can anybody help on atleast one usecase? where it helps.

    Thank you

  13. clydin commented on Aug 24, 2019

    @clydin
    Member

    @rogusdev The next version (9.0) will default to 500ms if the poll option is provided without a value. #15417

  14. angular-automatic-lock-bot commented on Sep 24, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  15. locked and limited conversation to collaborators on Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions