Angular-cli: --mobile is not accepted with ng new

Created on 17 May 2017  路  7Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

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

Versions.

@angular/cli: 1.0.3
node: 6.9.2
os: win32 x64
@angular/cli: 1.0.3

Repro steps.

I am following the steps given in Angular Mobile guide to create new app with Angular CLI
https://mobile.angular.io/guides/

On executing: ng new hello-mobile --mobile
I get:

The option '--mobile' is not registered with the new command.

As a result, the angular app gets generated but without the files required for mobile development

The log given by the failure.

The option '--mobile' is not registered with the new command.

Desired functionality.


Expecting an angular app to be generated with files required for mobile development

Mention any other details that might be useful.

RFC / discussion / question

Most helpful comment

@amishra511
There is a pretty good guide by @coryrylan about how to work with the manifest and service-worker available. I just tested it and it works like a charm.
He suggests using a combination of a manual manifest and sw-precache which is maintained by google.

Check out his guide here:
https://coryrylan.com/blog/fast-offline-angular-apps-with-service-workers

All 7 comments

The mobile option was removed some time ago because it did not work properly. #4143

The only way to create a mobile angular app is currently adding the manifest and service worker yourself.

@amishra511 this guide is totally outdated,
npm install -g angular-cli this is not correct name of package

As for now you should make you app "mobile" manually, as @kacase pointed above

@amishra511
There is a pretty good guide by @coryrylan about how to work with the manifest and service-worker available. I just tested it and it works like a charm.
He suggests using a combination of a manual manifest and sw-precache which is maintained by google.

Check out his guide here:
https://coryrylan.com/blog/fast-offline-angular-apps-with-service-workers

@kacase I will check this guide out.

@amishra511 Is it still an issue?

No, not anymore. I can create an angular mobile app now the way suggested by @kacase

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

delasteve picture delasteve  路  3Comments

donaldallen picture donaldallen  路  3Comments

MateenKadwaikar picture MateenKadwaikar  路  3Comments

sysmat picture sysmat  路  3Comments

gotschmarcel picture gotschmarcel  路  3Comments