How to automatically generate a page-name.module.ts? - ionic-framework

So in the newest version of Ionic when we use the generate page command
ionic g page page-name
Ionic creates the page's directory containing the page-name.html, page-name.scss and page-name.ts. It does NOT automatically create the file page-name.module.ts needed for lazy loading and deep links feature.
My question is: Is there any way or any plugin that automatically creates that file for each new page (or for all the existing ones)? Or do we really need to create that file manually for each and every page we create for our project?

As i experience in ionic cli 3.5 while creating a page, the page module was not getting generated. but on ionic cli 3.6 it was generating. need to check on ionic 3.7 which is released today.

Related

Publish with new update

I created a project in Flutter Web + Lazy Loading.
After updating project I'm running: Flutter Build Web
Then I put the project in the service of Vercel.
When I access the site I noticed that it is not downloading the new updates and generating blank pages when closing the site and opens again works.
Do I need to define the new version somewhere in the project and run: Flutter Build Web and post again to avoid this problem again?
By accessing the site all files are downloaded again by preventing the cache from undermining the user experience.

How to properly convert a Vue application to Ionic 4 Vue?

I'm trying to convert an existing VueJS project to use Ionic 4 and Ionic Native plugins. It's my first time using Ionic 4 and it looks like the Ionic CLI only allows you to build Angular based apps so far. The Vue integration needs to be done manually.
The documentation I've found so far allows me to consume Ionic components but does not seem to be enough to properly setup Ionic in my project.
After going through the steps and finally adding Vue.use(Ionic) to my main entry point, running ionic --help still tells me that my project is not an Ionic project, probably because I do not have a ionic.config.json available at root level. I then run ionic init, this config file gets generated, but it is now telling me to provide the ionic:serve npm script so that it can serve my project ("type": "custom"). How can I setup all the required scripts that Ionic needs ?
I will need to have this setup to be able to add Ionic Native plugins, build my app on different platforms, etc.
I could not find any information so far neither in the docs, nor in here.
Does anyone have further information about this ?
I know it's a bit late but it can be helpful for someone else. I'm in the same situation, and yes, now it's possible. From ionic docs:
https://ionicframework.com/docs/intro/cdn#ionic-vue

Ionic downloads from github - can I avoid doing this with each new app?

I am new to Ionic and just getting used to it. However I have noticed that when I create an app files are download from github such as:
Downloading:
https://github.com/driftyco/ionic-app-base/archive/master.zip
Often working without internet access is there a way that files I might need can be downloaded once and stored locally?
Yes, you can avoid downloading it with each new app. When you wrote something like to
$ ionic start YourAppName tabs
tabs - is an alias to Ionic starter repository. You can replace with relative or absolute path to a local directory.
Check out more about start parameters there - Starting an Ionic App.
EDIT: I don't see a reason why the code below couldn't work. And Yes, you have to unpack your default app files to some folder.
$ ionic start YourAppName c:\Temp\ionic-app-base-master
The command ionic start myApp will always create your project with the latest version of Ionic. It will always download the github. Currently there is no how to create a new project without using the downlod of the github.
You can create a blank project and uses it as "boilerplate project" (ionic start myApp blank). Then, when necessary, to update the Ionic (newest version) go to the root of your project and run ionic lib update.
Just download all the templates once and use it whenever you need when you are offline. Ionic will always download latest bundle when you do:
ionic start MyApp

ionic cli - export project from 'Creator' not working

I've created a test project using ionic creator. I've created a blank page, assigned a title and added a button.
I save the project and I'd like to export the project
Ionic Creator - Using CLI
When I use the Ionic CLI tool with the command
ionic start [appName] creator:[MY_ID]
It tries to download my project from the following URL:
https://apps.ionic.io/api/v1/creator/[MY_ID]/download/html
This returns an empty zip file. So my project doesn't get initialised.
Ionic Creator - ZIP Export
The ZIP file link in creator is the following URL:
https://creator.ionic.io/api/v1/creator/[MY_ID]/download/html
This does return a ZIP with what I expect in.
I have successfully checked out a project using the CLI ~2 weeks ago and can't see what I'm doing differently. I'd be interested to know if anyone else is experiencing this problem?
I've tried putting the ZIP file contents into the WWW folder and initialising that way but to no avail.
CLI version is 1.7.1
OS is Windows 7
I have updated both the CLI and Cordova to the latest version.
Any ideas?
Note: I've raised this as a GitHub issue too - https://github.com/driftyco/ionic-cli/issues/619
I've upgraded from 1.7.1 to 1.7.6 today and it's now working.
It's using the following URL now -
https://creator.ionic.io/api/v1/creator/[ID]/download-start/cordova?sid=[SID]

Where to get .xap file in Windows using ionic build?

I am using Ionic framework for my project. As per ionic build I have used the build command for windows:
ionic build windows
After the build I get the file structure as below:
The issue is I'm not able to figure out were do I get the .XAP file inside the platform/windows folder and I'm completely new on Windows build.
I'm just posting this as an answer, to which we came in the comments under the OP's question:
Add the windows phone platform: ionic platform add wp8.
Build for wp8: ionic build wp8.
The file CordovaAppProj_Debug_AnyCPU.xap is the one you're looking for.
However, I would like to turn your attention to these few posts:
http://blog.vjrantal.net/2015/01/08/experiences-with-ionic-on-windows-phone-8-1/
http://blogs.msdn.com/b/msdn_answers/archive/2015/02/10/running-cordova-apps-on-windows-and-windows-phone-8-1-using-ionic-angularjs-and-other-frameworks.aspx
http://appfoundry.be/blog/2014/10/16/ionic-windows-phone
which basically confirm what the official Ionic team says that the platforms wp8 and windows in general are not yet fully supported; but they hope they soon will be.