My experience on my daily works... helping others ease each other

Sunday, February 18, 2018

Save list as CSV in ionic (PWA)

Read/Write file into devices

Installation (https://ionicframework.com/docs/native/file/)

Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-file
$ npm install --save @ionic-native/file
Add this plugin to your app's module

There are few ways you can use to download the file, but I'm using the easiest way, that is implementing the download which I'm not pretty sure if it runs ok on Android and iOS.
I'm not writing directly into the device storage as there are many things to consider such as storage area, security, etc.

Few references:

  1. http://ngcordova.com/docs/plugins/file/
  2. https://www.npmjs.com/package/cordova-plugin-file
  3. https://github.com/apache/cordova-plugin-file
  4. https://github.com/jiahao1553/demo-ionic2-save-csv/blob/master/src/pages/home/home.ts
Share:

List of Data Sciences and Machine Learning usefull link

Credit to: Shivam Panchal
As published by Shivam at Linked @ https://www.linkedin.com/pulse/data-science-machine-learning-beginners-path-shivam-panchal/

Platforms:

  1. What Is Hadoop? Hadoop Tutorial For Beginners https://youtu.be/n3qnsVFNEIU
  2. What is Apache Spark? The big data analytics platform explained http://www.techworld.com.au/article/629920/what-apache-spark-big-data-analytics-platform-explained/
  3. Apache Spark Tutorial: ML with PySpark https://www.datacamp.com/community/tutorials/apache-spark-tutorial-machine-learning
  4. A Beginner's Guide To Apache Pig https://hortonworks.com/tutorial/beginners-guide-to-apache-pig/
  5. Realtime Event Processing in Hadoop with NiFi, Kafka and Storm https://hortonworks.com/tutorial/realtime-event-processing-in-hadoop-with-nifi-kafka-and-storm/

Math:

  1. A Deep Dive Into Linear Algebra https://www.khanacademy.org/math/linear-algebra
  2. An Introduction to Combinatorics & Graph Theory https://www.whitman.edu/mathematics/cgt_online/cgt.pdf

Tools & Framework:

  1. TensorFlow Tutorial – Deep Learning Using TensorFlow https://youtu.be/yX8KuPZCAMo
  2. A 6-part introduction to the MXNet API https://becominghuman.ai/an-introduction-to-the-mxnet-api-part-1-848febdcf8ab
  3. Keras Tutorial: The Ultimate Beginner's Guide to Deep Learning in Python https://elitedatascience.com/keras-tutorial-deep-learning-in-python

Data Visualization:

  1. Building Python Data Apps with Blaze and Bokeh https://youtu.be/1gD9LMqREDs
  2. Matplotlib Tutorial: Python Plotting https://www.datacamp.com/community/tutorials/matplotlib-tutorial-python
  3. Python Bokeh Tutorial - Creating Interactive Web Visualizations https://youtu.be/Mz1AXUE0nR4

Concepts:

  1. Simple Linear Regression https://onlinecourses.science.psu.edu/stat501/node/250
  2. Simple and Multiple Linear Regression in Python https://medium.com/towards-data-science/simple-and-multiple-linear-regression-in-python-c928425168f9
  3. Linear Regression in R https://www.tutorialspoint.com/r/r_linear_regression.htm
  4. An Introduction To Logistic Regression http://ufldl.stanford.edu/tutorial/supervised/LogisticRegression/
  5. Building A Logistic Regression in Python, Step by Step by Susan Li https://medium.com/towards-data-science/building-a-logistic-regression-in-python-step-by-step-becd4d56c9c8
  6. Supervised and Unsupervised Machine Learning Algorithms https://machinelearningmastery.com/supervised-and-unsupervised-machine-learning-algorithms/
  7. 6 Easy Steps to Learn Naive Bayes Algorithm (with codes in Python and R) https://www.analyticsvidhya.com/blog/2017/09/naive-bayes-explained/
  8. A Tutorial on Support Vector Machines for Pattern Recognition http://www.cs.northwestern.edu/~pardo/courses/eecs349/readings/support_vector_machines4.pdf
  9. A Complete Tutorial on Tree Based Modeling from Scratch (in R & Python) https://www.analyticsvidhya.com/blog/2016/04/complete-tutorial-tree-based-modeling-scratch-in-python/

Python:

  1. A Complete Tutorial to Learn Data Science with Python from Scratch https://www.analyticsvidhya.com/blog/2016/01/complete-tutorial-learn-data-science-python-scratch-2/
  2. NumPy Tutorial: Data analysis with Python https://www.dataquest.io/blog/numpy-tutorial-python/
  3. Scipy Tutorial: Vectors and Arrays (Linear Algebra) https://www.datacamp.com/community/tutorials/python-scipy-tutorial
  4. Python Pandas Tutorial https://www.tutorialspoint.com/python_pandas/
  5. Machine Learning with scikit learn Part 1 & 2 https://youtu.be/2kT6QOVSgSghttps://youtu.be/WLYzSas511I

CS:

  1. A Thorough Overview of Computational Logic https://www.cs.utexas.edu/users/boyer/acl.pdf

Game Theory:

  1. Game Theory - A 3 Part Introduction https://youtu.be/x8gOi7D6QeQ

Statistics:

  1. Correlation & causality https://www.khanacademy.org/math/probability/scatterplots-a1/creating-interpreting-scatterplots/v/correlation-and-causality
  2. Analysis of variance (ANOVA) https://www.khanacademy.org/math/statistics-probability/analysis-of-variance-anova-library
  3. Understanding Hypothesis Tests: Significance Levels (Alpha) and P values in Statistics https://shar.es/1PANrc
  4. Characteristics of Good Sample Surveys and Comparative Studies https://onlinecourses.science.psu.edu/stat100/node/3
  5. Descriptive and Inferential Statistics https://www.thoughtco.com/differences-in-descriptive-and-inferential-statistics-3126224
  6. Intro to Probability Theory https://youtu.be/f9XFM8YLccg
  7. Introduction to Conditional Probability & Bayes theorem for data science https://www.analyticsvidhya.com/blog/2017/03/conditional-probability-bayes-theorem/
  8. Central limit theorem https://www.khanacademy.org/math/statistics-probability/sampling-distributions-library/sample-means/v/central-limit-theorem
Share:

Wednesday, February 14, 2018

Synchronizing the Asynchronous - Controlling the flow in ascynchronous type of apps

You have certain process to run in sequence; for instance
1. Login into the system
2. Check if the user valid, user status is valid, user role is valid
3. Store for future references
4. Capture audit trail and set timing, menu etc
5. Finally, show correct page base on user role and preferences

This shall be ok in synchronize programming. However, for programming like javascript, js, etc., you may face issues such as null value on a certain process, invalid id, or pages, etc.

There is ways, 'easy' way, but there is no guarantee that the data you will be receiving is accurate or at the exact time you need it.

Example of easy way is using timeout, as shown below

setTimeout(() => {
resolve('success');
}, 100)


Yet, the above example may not resolve your issues entirely.

Another option that looks promising is using Promise. However, there is a drawback to it. Your program may continue waiting despite it is already completed. Although it is a promise, within promise is still asynchronous program run.

return new Promise( (resolve, reject) => {
if (user) {
console.log("getUserProfile() - Success getting user in "
+ JSON.stringify(user) );
resolve(user);
} else {
this.showError('Access Denied! Invalid User Access');
reject('Access Denied! Invalid User Access');
}
});

Take for example the above code. The console may run after resolve(user) as the JSON.stringify may take few seconds than just return resolve value.

So, what is the best solution. Actually, there are no better solutions. What I did was,
1. Rewrite the code and logic and ensure all setting was done prior to user validation and page movement.
2. You can use Reducer or Promise-Sequential

You may refer here:

  1. https://blog.risingstack.com/node-hero-async-programming-in-node-js/
  2. https://forum.ionicframework.com/t/how-can-i-use-promise/40469/3
  3. https://www.promisejs.org/
  4. https://javebratt.com/wtf-promise/
  5. http://coenraets.org/blog/2016/02/angular2-ionic2-data-services-promises-observables/https://stackoverflow.com/questions/47767654/ionic-3-typescript-promise


For me, I'm using the latter (with timeout) as the former implementation is a bit complicated compared to the latter.

Here how I resolve the problem:
var sequential = require('promise-sequential');
var array = [this.getUserProfile(),this.validateUser()];

sequential(array.map((item) => {
return function(previousResponse, responses, count) {
return new Promise(resolve => {
setTimeout(() => {
resolve('success');
}, 100)
})
}
}))
.then(res => {
this.doLogin()
})
.catch(err => {
console.log('loginWithPromise(): ' + err );
this.showError(err);
})

wallawei!!! Hope it helps :)
Share:

Thursday, February 1, 2018

Running javascript on typescript project (Ionic + Angular) - 'require' not found

Using javascript on Ionic + Angular project which is based on typescript may troublesome and causing you days to figure out. You can get many kind of error such as 'require' not found, 'typescripts' not available, 'no such library' etc.

However, there are ways to implement. You can follow the steps mentioned here. I'm trying to implement bcryptjs on my ionic project. You may have different javascript required. Nonetheless, the steps shall be similar.

First, take a look at https://x-team.com/blog/include-javascript-libraries-in-an-ionic-2-typescript-project/ and follow some of the step shown here.

Then, follow the step discussed at https://stackoverflow.com/questions/31173738/typescript-getting-error-ts2304-cannot-find-name-require

And you shall be successfully run script based on javascript on your Ionic + Angular Project.

Wallawei!!!!
Share:

Sunday, December 31, 2017

Javascript to newbies

Want to learn JavaScript and conquer the world? Start here:

Tutorials and Books
- JavaScript For Cats is a dead simply introduction for new programmers.
- MDN JavaScript Guide has the most standard and straightforward tutorials. If you need references, MDN is here for you
too.
- You Don’t Know JS is the best book to learn JavaScript from. It’s free to read on GitHub.
- Eloquent JavaScript is another great introduction to programming and learning JavaScript.
- Modern JavaScript Cheatsheet helps you understand and learn all the new features in the language.
- JSBooks, a collection of free JavaScript books.

Videos and Courses
- JavaScript: Understanding the Weird Parts an incredible course which teaches the concepts of the language. First 3 hours
are free on YouTube, you can but the whole course from Udemy.
- FunFunFunction makes the learning process enjoyable.
- Javascript30, 30 videos to level up your skills.
- Traversy Media great contents mostly aimed for begginers.

Learn by Doing
- FreeCodeCamp, learn to code by building projects.
- CodeAcademy, learn to code interactively.
- Codewars, train with programming challenges.

Functional Programming
This where the true the good parts show theirselves.
- JSUnconf 2016, learn functional programming basics with this talk from Anjana Vakil.
- FunFunFunction's videos are a great start.
- Mostly Adequate Guide to Functional Programming and Functional Light JS will make you master the functional programming.
- JavaScript Allongé, programming from functions to classes.
- Functional Programming Jargon in simple terms.
- awesome-fp-js is a good reference for functional programming in JavaScript.

Other Resources
- Spellbook of Modern Web Dev is a big picture of modern JavaScript development.
- What the fuck JavaScript?, list of funny and tricky JavaScript examples.

From JS telegram Part of @thedevs 
Rules: @thedevsrules Join other dev groups https://thedevs.network
Share:

Thursday, December 28, 2017

Cannot parse JSON-encoded object value

I'm using Loopback, a node.js API framework which helps you to develop RESTful API very easy and fast. It reduces the programming/coding require and allow you to deploy your API within days.

However, things may not be as easy you can think of. The documentation given is still lack of information and there are not many solutions that can help you to solve your problem. One of it is Cannot parse JSON-encoded object value issue.

The error message you will get as example below

error": {
"statusCode": 400
"name": "Error"
"message": "Cannot parse JSON-encoded object value."
"stack": "Error: Cannot parse JSON-encoded object value. at Object.fromSloppyValue (D:\Project\loopback\touchpoint\node_modules\strong-remoting\lib\types\object.js:34:19) at HttpContext.buildArgs (D:\Project\loopback\touchpoint\node_modules\strong-remoting\lib\http-context.js:193:22) at new HttpContext (D:\Project\loopback\touchpoint\node_modules\strong-remoting\lib\http-context.js:59:20) at restStaticMethodHandler (D:\Project\loopback\touchpoint\node_modules\strong-remoting\lib\rest-adapter.js:485:15) at Layer.handle [as handle_request] (D:\Project\loopback\touchpoint\node_modules\express\lib\router\layer.js:95:5) at next (D:\Project\loopback\touchpoint\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (D:\Project\loopback\touchpoint\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (D:\Project\loopback\touchpoint\node_modules\express\lib\router\layer.js:95:5) at D:\Project\loopback\touchpoint\node_modules\express\lib\router\index.js:281:22 at Function.process_params (D:\Project\loopback\touchpoint\node_modules\express\lib\router\index.js:335:12) at next (D:\Project\loopback\touchpoint\node_modules\express\lib\router\index.js:275:10) at Function.handle (D:\Project\loopback\touchpoint\node_modules\express\lib\router\index.js:174:3) at router (D:\Project\loopback\touchpoint\node_modules\express\lib\router\index.js:47:12) at Layer.handle [as handle_request] (D:\Project\loopback\touchpoint\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (D:\Project\loopback\touchpoint\node_modules\express\lib\router\index.js:317:13) at D:\Project\loopback\touchpoint\node_modules\express\lib\router\index.js:284:7"

You can google it but the solution was not helpful enough to guide you. Sometimes, when you used its pre-default apps (coming together when you setup your loopback apps) known as swagger (Loopback API Explorer), the url and parameter used seem work as it meant to be. The problem only occurs when you try to call it from 3rd party apps such as ARC (Advanced Rest Client, POSTMAN, IMSONIA) or from your program, the above error occurs.

How to solve this?


  1. Ensure that you run and test your parameter passing which should be in JSON format is valid. You may use online such as Jsonlint or any JSON validator available.
  2. If it is valid, then, ensure that all key and value is in open and close double quote - "key": "value". Do not use single quote 'key': 'value'
  3. Finally, if the above two is correct, encode some of your parameter; for instance, '%' shall be encoded to '%25'. Use online encoder to help you such as https://www.urlencoder.org/


The above solution only applicable if you implement method through http GET, POST, PATCH, etc request. It may not be applicable for other REST calling method.

#enjoycoding





Share:

Wednesday, December 27, 2017

Set the display to center using Ionic

If you are developing apps focusing only on mobile, you may not be facing display issue as the user won't be able to see gaps or alignment problem. However, if you are developing apps that required to run on multiple platforms including web and mobile, aligning your display may cause a problem.

You will spend lots of time to configure your .css (or .scss) and when you thought you solved the problem on mobile, it shows differently on web.

I too faced such difficulties and finally found a way to solve it. I'm using ion-card and ion-list together.

here are snapshot of the code
<ion-card-content style="justify-content: center; margin-left: 0px; margin-right:
0px;background-color: #000000;">
<ion-card-title style="color: #fcfa87">
Center content <br> Working together
</ion-card-title>
<ion-list no-lines style="justify-content: center; margin-left: 0px;
margin-right: 0px; background-color: #030303;">
<ion-item style="background-color: #f1f7d6;">
<ion-label floating class="item item-input">Username</ion-label>
<ion-input type="text" name="username" class="input-label"></ion-input>
</ion-item>

and of course you need to configure your .scss too

snapshot of the code
.displayed {
display: block;
margin-left: auto;
margin-right: auto;
}
.card{
width:100%;
margin: auto;
}

the first (.displayed) shall be call by your ion-content tags and the .card is automatically set the card to be 100% width depending on your screen size

and it shall be displaying nicely on any screen as shown below
On web browser

On iPhone 7
For complete source code, you can download from my github.

All the best coding :)

Share:

Tuesday, October 31, 2017

Best Hacking e-books 2017

1.Metasploit The Penetration Tester's Guide 
https://www.up-4ever.com/591f0cz49n7d

2.A Beginners Guide To Hacking Computer Systems 
https://www.up-4ever.com/idwc4g1ag2ob

3.Black Book of Viruses and Hacking 
https://www.up-4ever.com/niv9ibml1voe

4.Hackers High School 13 Complete Hacking Ebooks 
https://www.up-4ever.com/82dzt2rjcpy3

5.Reverse Engineering Hacking and Cracking 
https://www.up-4ever.com/b2fgqs7cxw9a

6.Computer Hacking 
https://www.up-4ever.com/tuaz42q7dh0y

7.Blind SQL Injection Discovery & Exploitation 
https://www.up-4ever.com/83i3791x8gc5

8.Hacking With Experts  Facebook Hacking)Size:3mp 
https://www.up-4ever.com/ruph352nrxcl

9.Computer Hacking & Malware Attacks for Dummies 
https://www.up-4ever.com/xgcvoxuc6y76

10.stealing network 
https://www.up-4ever.com/96r86k3dg2yy

11.secrets of super hacker 
https://www.up-4ever.com/kifr8kytmfz9

12.501 websites secrets 
https://www.up-4ever.com/zqpne3e4s2cy

13.google dangerous searching 
https://www.up-4ever.com/en6dihqmf3lm

14.hacking gmail 
https://www.up-4ever.com/v2oxzy02sgm8

15.computer viruses 
https://www.up-4ever.com/gib7ecozp8yg

16.google apps hacks 
https://www.up-4ever.com/cxokzthwn6rh

17.gray hat hacking 
https://www.up-4ever.com/s5e7c3jif0kn

18.webapp hacker hand book 
https://www.up-4ever.com/85y1mqe8qgar

19.denial of service 
https://www.up-4ever.com/dfpwh6a3uw4y

20.Vulnerability Exploit & website Hacking for Dummies 
https://www.up-4ever.com/9hxraizlp8zq

21.Internet Advanced Denial of Service (DDOS) Attack 
https://www.up-4ever.com/gyf271w4gwbo

22.Beginning Ethical Hacking with Python.pdf       
http://gsurl.in/4Laz

23.Certified Ethical Hacker (CEH) Foundation Guide.pdf 
http://gsurl.in/4Lbj

24.Game Hacking.pdf
http://gsurl.in/4Lbt

25.Hacking Android.pdf 
http://gsurl.in/4LbB

The link listed above is valid as of 30th October 2017
Share:

Saturday, September 30, 2017

Developing Microservices Using Orleans by Microsoft



Image result for microservices architectureI am new to Microservices although it has been a while in software engineering world. Luckily Microsoft (am not marketing them) has done a pretty good job in explaining the detail.

Take a look if you guys which to understand in detail.

Microservices offer great benefits but also raise huge new challenges. Microservice architecture patterns are fundamental pillars when creating a microservice-based application. [more]

And as part of their initiative (and of course to boost their .NET platform), they too develop a framework to support the implementation of microservices. Have time to read here.

* note: all link is valid as of 1st October 2017


Share:

Tuesday, July 25, 2017

Replicate same question to different course in Moodle

How do I copy Moodle Quiz questions from one course to another?

In the Moodle section from which you would like to copy questions:
1. In the “Administration” block, click on “Export” in the “Question bank” menu.
2. Choose “Moodle XML format” and select the category you would like to copy from the “Export category” drop-down menu; click on the “Export questions to file” button.
3. Save the file to your desktop.
4. Go to the Moodle section to which you would like to copy the questions.
5. Click “Import” in the “Question bank” menu.
6. Choose “Moodle XML format,” and make sure the “Default” course level category is chosen for the “Import category” drop-down menu.
7. Click “Choose file…” to open the “File picker” window.
8. In the “File picker” window, click “Choose File” to browse and select your exported Moodle questions file, then click “Upload this file.”
9. Click “Import,” and you will see a preview of the imported questions.
10. Click “Continue” to proceed to the category containing the imported questions.
NOTE: At this point, you have only copied the quiz questions, and must still create a new quiz and load in the copied questions.

To add the copied questions into a new quiz:

1. Go to the home page of your Moodle course section and click “Turn editing on.”
2. Click the “Add an activity or resource” link in any section where you would like the link to your quiz to be displayed.
3. In the “Add an activity or resource” window, choose “Quiz” and click on the “Add” button.
4. Give your quiz a Name, Open and Close Dates, and set any other desired configurations.
5. Click on the “Save and display” button at the bottom of the page.
6. Click on the “Edit quiz” button; in the “Select a category” drop-down menu in the purple box on the right, select the (newly imported) question category.
7. Check the box to the left of the questions you would like to add to the quiz, or check the box at the top of the column to select all.
8. Click on the “Add to quiz” button.

The above content is copied directly from here:
https://delta.ncsu.edu/knowledgebase/how-do-i-copy-moodle-quiz-questions-from-one-course-to-another/
Share:

Thursday, July 20, 2017

Tableau - The user could not be added because you do not have access to the domain specified.

You may get the following error when you try to add new user. You have try may solutions as listed in Tableau:


Even you have file a case at Tableau Support and received respond from them. I received the following from Tableau Support:
Thank you for contacting Tableau Technical Support. My name is Henk, and I will be assisting with this case.

I have investigated the reported issue and I do have some steps below that should resolve the permissions issues on Tableau Server. We suggest consulting with your Active directory administrator to make sure the Tableau Server Run As User account has been granted permission to has access to query the Active Directory. If having the access capability, please follow the steps below re-entering the Run As User password and start Tableau Server.

• Try stopping TABLEAU Server, re-enter the Run As User password and start Tableau Server

1. Open Command Prompt and run as administrator, navigate to the “bin” folder located in the Tableau Server directory. For example if Tableau Server is installed in the default location, the directory will be: C:\Program Files\Tableau\Tableau Server\\bin 2. Type the following command to stop Tableau Server: tabadmin stop 3. From the start menu, type "Configure Tableau Server", and right click the program to open it as a Window Administrator.
4. Type the Run As user password and click "Ok" to save.
5. Type the following command to start Tableau Server: tabadmin start

Additional information on how to add Active Directory users can be found in the following links:

Add Users to a Site

I believe the above information will resolve this issue. If the information provided does not resolve the issue, please let me know by responding with the additional information requested below and a few details regarding why the solution above did not resolve the issue.

1.            What issues are still occurring?
2.            Did the steps not resolve the issue?
3.            Is this an issue with all users or just a specific Active Directory user?

We may send a survey to confirm that the case has been fully resolved.

We appreciate any feedback on this issue as well as the general Tableau Technical Support experience.

Thank you for being a valued Tableau Software customer!

Please find your case summary below. To update this case via email, please reply to this message.

Sincerely,
Henk
Tech Support
Tableau Software


After try all the above, you still get the same result and thought of re-install your tableau server. Before you do that, let me give you another solutions:
1. Please make sure the username used to manage the tableau server (start, stop, restart) is register in the same domain as other user (in your Active Directory, LDAP server, or any authentication method used excluding local authentication)
2. If no. 1 ok, then ensure that the user has administrator privileges and has granted by your domain authenticator (in my case is Active Directory)
3. Open you Tableau Server Config (for Windows Start Menu > Tableau > Config Tableau Server).
4. In the window pop-up, make sure the username and password entered is the same username/password register in the Active Directory.
5. Restart your tableau server. Opps.. I recommended that you stop your tableau server first. :)

And it shall solve your problem.

p/s: it took me 2 days to figure out.

Share:

Friday, May 26, 2017

Kotlin + Netbeans IDE 8.2 - Don't use yet

I try the new language Kotlin with Netbeans 8.2.
http://plugins.netbeans.org/plugin/68590/kotlin

After download and install the plugin, it cause error on all projects currently on my list of projects and causing my netbeans to behave abnormally.

The error does not stop there. When I uninstall it, which you can't as it only appear in User Plugin and when you uninstall the plugin (just for the sake to remove kotlin), it causes many other problem.

So guys, use with extra careful ya.
Share:

Thursday, March 2, 2017

Get start with ionic framework

When I first developed apps using ionic, not many resources over the net will provide good explanation on it. I've found one and it is very easy to understand.

Here is the structure of ionic framework after it successfully execute ionic start command; for example 

ionic start myfirst blank --v2

>> ionic start [your_apps_name] [template] [ionic_framework_version]

the command will create a new folder (myfirst) and construct the following structures

├── hooks // custom cordova hooks to execute on specific commands 
├── platforms // iOS/Android specific builds will reside here 
├── plugins // where your cordova/ionic plugins will be installed 
├── resources // icon and splash screen 
├── scss // scss code, which will output to www/css/
 |── www // application - JS code and libs, CSS, images, etc. 
      |---------css //customs styles 
      |---------img //app images 
      |---------js //angular app and custom JS 
      |---------lib //third party libraries 
      |---------index.html //app master page 
├── bower.json // bower dependencies 
├── config.xml // cordova configuration 
├── gulpfile.js // gulp tasks 
├── ionic.project // ionic configuration 
├── package.json // node dependencies


Following are current potential templates that you can use:
  • tabs : a simple 3 tab layout
  • sidemenua layout with a swipable menu on the side
  • blanka bare starter with a single page
  • superstarter project with over 14 ready to use page designs
  • tutoriala guided starter project

Once it is completed, you will get to see the following message appear:
Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
Downloading: https://github.com/driftyco/ionic2-starter-                   sidemenu/archive/master.zip                                                
Installing npm packages (may take a minute or two)...                      
-                                                                          
♬ ♫ ♬ ♫  Your Ionic app is ready to go! ♬ ♫ ♬ ♫                          
                                                                           
Some helpful tips:                                                         
                                                                           
Run your app in the browser (great for initial development):               
  ionic serve                                                              
                                                                           
Run on a device or simulator:                                              
  ionic run ios[android,browser]                                           
                                                                           
Share your app with testers, and test on device easily with the Ionic View companion app:                                                             
  http://view.ionic.io                                                     

Yeah... now you test your apps. Just run ionic serve to view on your browser. It will pop-up your browser and automatically navigate to http://localhost:8100 ... else, you can open your browser and go to the address.

If you want to view in mobile, you may use mobile emulator or deploy on your mobile. Before that, do install mobile platform package first. To do that, run the following command:

                                                                       
ionic platform add ios  // to add ios platform into the package      
                                                                     
ionic platform add android //to add android platform into the package  
                                                                       

Finally, you are ready to run (on emulator or actual device).


                                                                           
ionic run android --prod --release //to run on emulator as production mode 
                                                                           
ionic build android --prod --release //to build as package for installation
                                                                           

For ios, it will require more steps and you can follow it https://ionicframework.com/docs/v2/intro/deploying/.

Lets dance... :)
Share:

About Me

Somewhere, Selangor, Malaysia
An IT by profession, a beginner in photography

Labels

Blog Archive

Blogger templates