How do I start a blank project in Ionic - ionic-framework

I am new to the Ionic Framework, very new, and I wanted to start a new project, but every time I start a new project it autodownloads the tabs sample as my project. I want a blank new project, how can I stop Ionic from downloading the tabs sample, because as it is I'm not sure which files to remove without breaking anything.

Execute this command to start a new blank app with the name "myApp":
ionic start myApp blank

What command do you use to create the project?
Have you tried:
ionic start myApp blank
You should read the doc:

Simple:
ionic start APP_NAME blank.
Or you want to specify more information:
ionic start -a APP_NAME -i PACKAGE_NAME FOLDER_NAME blank

Hi Just follow this steps and you will able to open a blank project in ionic.
Open the terminal and write
npm install -g ionic
then next command is
ionic start myApp blank ( myApp is the project name you want to create ) for example
ionic start fashion blank ( So here I want to create an app for e-commerce and my project name is fashion )
I hope this will work for you.

Related

How come "flutter create ." adds desktop support?

I created a Flutter project within Android Studio, and then later found out that Flutter supports desktop. After searching the web, I did things like switching to "dev", adding config for desktop, etc. But when I tried to ran it, I got "No Windows desktop project configured", even though I enabled the configuration.
The documentation page had
To add desktop support to an existing Flutter project, run the following command in a terminal from the root project directory:
flutter create .
This adds the necessary desktop files and directories to your existing Flutter project.
But what is the meaning of .? How come that . means "adding desktop support"?
The command to add desktop support are those one:
flutter config --enable-windows-desktop
flutter config --enable-macos-desktop
flutter config --enable-linux-desktop
Once you used them, you change your flutter config.
Then, the usage of flutter create . simply mean "Create a new flutter project in my current folder".
If you're already in a Flutter project, it will just "recreate" your project by adding the new support for Desktop since you specify in your flutter config.
flutter config --enable-[windows,linux,macos]-desktop
flutter create .
if there is some error with second command, remove - sign from parent folder name, and run this command:
flutter create --org com.example.myapp .
Run this command it works fine for me.
run
flutter config --enable-windows-desktop
then run
flutter create .
if flutter create . generate error, probably there is - in your root project directory.
for example it will generate error if your project is like below
Alewa-Stock
to work it fine rename your project directory like below
alewa_stock
then run the following command
flutter create --platforms=windows --org=com.alewa.store .
*
NB: Please change the name according to your preference.
flutter create --platforms=windows,macos,linux .
you can use this line instead

How I can open a project in browser when LiveReload don't go to the my project - ionic-framework

When I generate a new folder in the ionic app, I call ionic serve, but it shows me localhost:8100/tab1/tab1. Then I delete tab1/tab1 and write /myApp/myApp, but LiveReload again shows me localhost:8100, I tried, again and again, to write the path to my project, but it shows me again and again localhost:8100. What can I do?
Try: ionic serve --no-livereload

Ionic file structure wrong

i am new to ionic and there are some problems i am facing like the file structure is very different. like there is no lib folder no app.js file there is no angular.module('myApp') code anywhere.
help me out with it my whole work is pending.
i have tried re-installing ionic and cordove but didn't made any difference.
image attached below.
You are using ionic v2+ and not ionic v1. Ionic 2 uses Angular 2+ (not angularjs) and the language used is typescript.
The source files belong in src/ and root module is app.module.ts and starting component is app.component.ts
If you want to still use ionic v1, it is supported (the file structure you are looking for is of ionic 1). You need to set --type as ionic1 when you start the project.
https://ionicframework.com/docs/cli/start/
ionic start myApp blank --type=ionic1
you are not using ionic v.1 Ionic version have the pattern in which the js folder holds app.js,controller.js etc.
Ionic v-2 uses modules instead of controllers.Ionic 2 is oriented for Object Oriented Concepts, thats why it is the form of class. If you want a peculiar type of version use the command : ionic start newapp blank --v1 .
But i would suggest you to use typescript which better than js.

Ionic 2 www empty folder

I am trying to test a sample Ionic2 app. I have started using ionic start AppName --v2.
Got the code in local with src folder. But the www folder is empty. When I do ionic serve, its opening the app in browser and throws the below error.
Error: ENOENT: no such file or directory, open 'path\to\folder\www\index.html'.
www folder is not getting updated with the compiled code. Nor build folder is getting generated inside the src folder. I have typescript and other compilers installed as well.
Try re-installing ionic framework, and making sure your CI is updated.
It could also be a permission issue, have you tried using sudo ?
sudo ionic start AppName tabs --v2 --ts
also make sure you are at the root of your application when running
ionic server

Ionic Starter App testing - www directory not dound

I am new to this platform and I am following the guidelines at the docs. I am trying to test the app using ionic serve CLI response is that there are 3 addresses....I choose localhost and an error comes up - ""www" directory not found. please make sure the working directory is ionic project"
I need help working around this.
I am working on windows 7.
This generally happens when you try to run your project into sub-directory which do not contains ionic project. Verify if you have 'www' folder inside your ionic project or you mistakenly went inside other sub-directory and trying to execute 'ionic serve' command.
After creating you project. The cmd screen will give you the directory of newly created project. Therefore in the CMD type this command:
cd yourprojectname
eg
cd myionicproject
after that command is completed enter command:
$ ionic serve