Ionic proxy not working with ionic CLI - angularjs

I have added proxy in ionic.project
{
"name": "UNDP-App",
"app_id": "",
"proxies":[
{
"path":"/api",
"proxyUrl":"http://192.168.0.109/urautodeals/public/api"
}
]
}
As I run the ionic command ionic serve --lab, it did not load the proxy as shown in image below.

Updating the Ionic CLI to 3.19.0 fixed this for me. At the command line, enter:
npm install -g ionic
Note this does not change which framework version (1.3.1) you are using.

Related

How to write a gulp task to deploy my angularjs app to amazon s3 ?

I have following Angular project structure
I am new to creating gulp tasks. I tried for some simple projects and that worked fine but for this project, I am facing a lot of issues. I am unable to figure out the way to write a gulp task for this app structure.
This project I have to deploy on AWS S3 so for that I need it to build and deploy.
It would be really helpfull for me if anyone could guide me on this.
Below are the steps to build and deploy AngularJs application using gulp :
Prerequisites :
Install Nodejs 6.9.3.
check you npm version using "npm -v" in the command prompt.
Install gulp using "npm install -g gulp".
Set your environment variables for windows.
Add the below code snippet
gulp.task("js", function() {
return gulp
.src([
"./dev/libs/angular/angular.1.4.5.min.js",
"./dev/libs/angular/angular-animate.1.4.5.min.js"
])
.pipe(concat("scripts.js"))
.pipe(hash({
"format": "{name}_{size}.js"
}))
.pipe(gulp.dest("PATH_FOR_BUILD"));
});
For more details Angular JS - Build & deploy using gulp

Unable to load required framework: ext#null in extjs

Setting up extjs and sencha when I ran the app I get error unable to load required framework
root#samuel-pc:~/Documents/code/test# sencha app watch
Sencha Cmd v6.5.0.180
[ERR] Unable to load required framework: ext#null
First of all you must create workspace.json with sencha workspace init then add your frameworks into workspace.json like:
"frameworks": {
"ext": {
"path": "ext"
}
}
after that you can run sencha app install in order to install requirements and then you can run sencha app build and ...

How to install ion-google-place in ionic cordova application?

I use following tutorial to install (ion-google-place) but I found sth.
my error is:
bower EMALFORMED Failed to read /home/binov1/ElolinkProjectversion2/bower.json
Additional error details:
Unexpected token $
my bower.json:
{
"name": "HelloIonic",
"private": "true",
"devDependencies": {
"ionic": "driftyco/ionic-bower#1.1.1"
}
}
$ bower install ng-cordova-oauth -S
You can install ion-google-place after first creating the app. Here are quick instructions on how to do that:
source: http://ionicframework.com/getting-started/
Install node.js
Install cordov and ionic: npm install -g cordova ionic
Create your project folder: ionic start myApp tabs or choose a template of your choice
Move to your project folder: cd myApp
Create platform (iOS, Android, etc.): ionic platform add ios
Build the app: ionic build ios
Open emulator: ionic emulate ios
You can then install the plugin: bower install ion-google-place
Insert the your Google Maps javascript API:
<script src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script>
Add ion-google-place dependency on your ionic app:
angular.module('myApp', [
'ionic',
'ion-google-place'
]);
In your HTML markup, you can use the directive like this:
<ion-google-place placeholder="Enter an address, Apt# and ZIP" ng-model="location" />

Update Ionic in the existing project

I was excited to see the Release version of Ionic, but found myself unable to update my existing project. Here is what I did.
run npm install -g ionic
Open bower.json in your App's root folder (the one above www)
You will find something like this here:
{
"name": "MyAppName",
"private": "true",
"devDependencies": {
"ionic": "driftyco/ionic-bower#xxxxxxxx"
}
}
Change it to this (basically by changing the last line:
{
"name": "MyAppName",
"private": "true",
"devDependencies": {
"ionic": "driftyco/ionic-bower#1.0.0-rc.1"
}
}
Save the file
Go to command line and run this in your App Folder
bower update
ionic lib update
Run ionic lib to check the version number
Edit
This post relates to Windows OS, as I am using 64 bit Windows 7.
I also had a lot of problems to update an existing ionic project. This is what I did to solve the issue:
Remove bower.json from www/lib/ionic
Execute ionic lib update from the source project.
This action will ask for confirmation, just type yes and your project will be updated to the latest version.
You need not touch the bower.json file.
After npm install -g ionic, be in the root folder of your app and run this command:
ionic lib update
This will prompt you if you want to upgrade your project's Ionic version, i.e download and copy the new Ionic libraries.
I upgraded my ionic project from ionic v1.0.1 to v1.1.0 to by upgrading the command line tool with npm and then generating a start project to see what changed. Here's exactly what I did:
npm uninstall -g ionic
npm install -g ionic
Then ionic start tabsAppX tabs to create a starter project. When I compared it to a starter project created from the previous version of ionic, I saw that only the www/lib/ionic folder changed (to the newest version). So I simply copied that into my actual project and ran gulp scss to update my css files.
Here is what I did while using version 1:
Created a new project
Deleted all the content of www folder
Copied all the content of my earlier project
Pasted there in the new project
Make a point while doing ionic start old-project-name --type ionic1 keep the old-project-name to not to cause any problem later on

Any difference between node commands 'cordova ionic' and 'ionic'? Which command need to use?

Is there any difference between node commands npm install -g cordova ionic and npm install -g ionic.
Which command do I need to use to build a ionic project. The documentation given in ionic framework and npmjs are different.
First let's get the clarifications out of the way:
Cordova and ionic are names of packages that you install with the npm install command
The -g flag is used to install the packages globally and be available throughout the system.
Now, to answer your question: The documentation in npmjs for ionic assumes cordova is already installed and provides the command to install ionic-cli
If you try to run
ionic start myapp tabs
without having cordova installed only ionic it will throw a "Package missing" error.
The documentation in the ionicframework website mentions that the cordova package needs to be installed to use the ionic-cli successfully.
Why does ionic need cordova? Well because ionic-cli uses cordoba-cli, and when starting a new ionic project it first initialises a cordova project.
Therefore to start an ionic project, you need npm install -g ionic cordova and then ionic start myapp {templateName}
Hope everything is clear now!

Resources