JS Framework
Ionic
Install SDK
11 min
start your ionic project using a pre built template introduction in this section you learn how to install parse javascript sdk into your ionic project see more about parse sdk at parse javascript sdk api reference and parse open source documentation for javascript sdk prerequisites to complete this tutorial, you will need an app created at back4app follow the new parse app tutorial to learn how to create a parse app at back4app an ionic project started follow the getting started tutorial if you don’t have it set up 1 install sdk since ionic packages are managed by npm npm , all you have to do is to run the following command at your project folder level 2 connect your parse app import parse parse in home ts home ts or in the page you want to make use of home ts 1 import parse from 'parse'; use parse serverurl parse serverurl atrribute to set up the url for back4app parse server home ts 1 parse serverurl = 'https //parseapi back4app com/'; use parse initialize parse initialize method to set up the authentication token, connecting your page with back4app servers home ts 1 parse initialize("your app id", "your js key"); find your application id and your client key go to your app dashboard at back4app website navigate to app’s settings click on server settings server settings > core settings core settings block > settings settings return to your parse initialize function and paste your applicationid applicationid and javascriptkey javascriptkey 3 test your conection create a test code test your initial setup with the following code which creates an installation installation object first, go ahead and create a variable to show the result on your app home home page home ts 1 result string; next, display that variable on your home home view home html 1 2 {{result}} 3 finally, add the code that instanciates an installation installation object and saves it add this piece of code after setting up the communication home ts 1 let install = new parse installation(); 2 3 install save(null, { 4 success (install) => { 5 // execute any logic that should take place after the object is saved 6 this result = 'new object created with objectid ' + install id; 7 }, 8 error (install, error) => { 9 // execute any logic that should take place if the save fails 10 // error is a parse error with an error code and message 11 this result = ('failed to create new object, with error code ' + error message tostring()); 12 } 13 }); run your app on your browser 2\ wait until a new tab opens on your browser i n order to see the page in a phone frame, press f12 f12 3\ login at back4app website https //www back4app com/ 4\ find your app and click on dashboard dashboard 5\ click on core core 6\ go to browser browser if everything works properly, you should find a class named installation installation as follows it’s done! at this point, you have learned how to get started with ionic apps