Ionic, ta yaya za a shigar da wannan Tsarin akan Ubuntu 20.04

game da ionic

A cikin labarin na gaba za mu kalli Tsarin Ionic, da yadda za a iya sanya shi akan Ubuntu 20.04. Wannan tsarin zai ba masu amfani damar aiwatar da ayyuka tare da wasu sassan kamar Angular. Ionic cikakken tushen SDK ne don haɓaka aikace -aikacen wayar tafi -da -gidanka wanda Drifty Co.'s Max Lynch, Ben Sperry, da Adam Bradley suka kirkira a 2013. An fito da sigar asali a cikin 2013 kuma an gina ta a saman AngularJS da Apache Cordova. Koyaya, an sake gina sabuwar sigar azaman saitin abubuwan haɗin yanar gizo, wanda yana bawa mai amfani damar zaɓar yin ayyukan Angular, React ko Vue.js. Hakanan yana ba da damar amfani da abubuwan Ionic ba tare da wani tsarin keɓancewar mai amfani ba.

Ionic yana ba da kayan aiki da ayyuka don haɓaka tebur na matasan, wayar hannu da aikace -aikacen gidan yanar gizo na ci gaba dangane da ayyukan haɓaka fasahar yanar gizo na zamani. Don wannan, ana iya amfani da fasahar yanar gizo kamar CSS, HTML5 da Sass. Tare da wannan tsarin za mu iya haɓaka aikace -aikace tare da fasahar yanar gizo masu dacewa da iOS, Android ko yanar gizo da kanta. Hakanan yana ba da kayan aikin CLI mai ƙarfi wanda za mu iya sarrafawa da ƙirƙirar ayyukan.

Babban halayen Ionic

  • Wannan tsarin kyauta ne kuma tushen budewa. Yana ba da ɗakin karatu na kayan aikin ƙirar mai amfani da wayoyin hannu da aka gyara, waɗanda don ƙirƙirar aikace-aikace masu sauri da ma'amala.
  • Ionic yana amfani da Cordova, da ƙarin plug-ins na kwanan nan don samun damar yin amfani da ayyukan tsarin aiki na rundunar kamar GPS, kyamara, walƙiya, da sauransu.
  • Masu amfani za su iya gina aikace -aikacen su sannan su keɓance su don Android, iOS, Windows, tebur (tare da Electron), ko masu binciken zamani..
  • Ionic ya haɗa da sassan motsi, rubutu, ko jigon tushe mai fa'ida.
  • Lokacin amfani Abubuwan Yanar Gizon, Ionic yana ba da abubuwan haɗin gwiwa na al'ada da hanyoyin hulɗa da su. Ofaya daga cikin waɗancan ɓangarorin, gungurawa mai kama -da -wane, yana bawa masu amfani damar gungurawa ta cikin jerin dubban abubuwa ba tare da wani tasiri ba. Wani bangaren, Tabs, yana ƙirƙirar keɓaɓɓen keɓancewa wanda ke goyan bayan kewayawa irin ta asali da sarrafa matsayin tarihi.
  • Baya ga SDK, Ionic kuma yana samarwa masu haɓaka sabis na iya amfani da su don ba da fasalikamar aiwatar da lambar ko ginawa ta atomatik.
  • Har ila yau yana ba da nasa IDE da aka sani da Ionic Studio.
  • Yana kuma bayar da dubawa na Layin umarni (CLI) don ƙirƙirar ayyukan. CLI kuma yana ba masu haɓaka damar ƙara ƙarin Cordova plugins da fakiti, ba da damar sanarwar turawa, samar da gumakan aikace -aikace, fesa fuska, da ƙirƙirar binaries na asali.

Sanya Ionic akan Ubuntu 20.04

Shigar da wannan tsarin yana da sauƙi. Don farawa kawai muna buƙatar buɗe tashar jirgin ruwa (Ctrl + Alt + T) da sabunta kunshin tsarin mu:

sudo apt update; sudo apt upgrade

Sa'an nan za mu shigar da wasu fakiti masu mahimmanci. A cikin tashar guda ɗaya dole ne mu yi amfani da umarnin:

girka masu dogaro

sudo apt install curl gnupg2 wget git

Mataki na gaba shine shigar NodeJS. Wannan misalin na gwada tare da sigar 14.x. Don shigar da wannan sigar, za mu fara da ƙara mazubin da ake buƙata:

ƙara repo nodejs

curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -

To zamu iya shigarwa NodeJS yanã gudãna da wannan sauran umurnin:

shigar da nodejs

sudo apt install nodejs

Ionic yana buƙatar Apache Cordova. Yakamata a fayyace cewa wannan saiti ne na kayan aikin API wanda ke ba da damar mai haɓaka aikace -aikacen wayar hannu, ta amfani da JavaScript, don samun damar ayyukan asalin na'urar, kamar kyamara ko accelerometer.

Bayan shigar da NodeJS, zamu iya shigar cordova Gudun:

shigarwa cordova

sudo npm install -g cordova

A wannan gaba, zamu iya ci gaba zuwa shigar Ionic ta amfani da npm:

shigarwa ta amfani da npm

sudo npm i -g @ionic/cli

Bayan kafuwa, zamu iya duba sigar shigar da umarni:

ionic version

ionic -v

Misali aikace -aikace

Don sanin idan an yi shigarwa daidai, za mu iya farawa ta ƙirƙirar ƙaramin aikace -aikacen misali. Don yin wannan, kawai za mu yi gudanar da wannan umarni ƙirƙirar misali:

ionic start

Lokacin gudanar da wannan umarnin dole ne ku ayyana irin aikin da kuke son ƙirƙirar. Don wannan misalin na zaɓi Angular. Bugu da ƙari, dole ne ku ba aikin ku suna kuma zaɓi samfuri. Duk wannan za ku zaɓi daga allo mai kama da mai zuwa:

farawa ionic

Bayan saitin, za a ƙirƙiri babban fayil tare da sunan da muka ba aikin. Shiga wannan babban fayil ɗin don ganin tsarin aikin.

umarnin farawa don misali

Don samun damar duba aikin, a cikin tashar guda ɗaya za mu aiwatar da wannan sauran umarnin:

fara sabar

ionic serve --host 0.0.0.0 --port 8000

Da wannan umarnin za mu ba da damar kowane mai watsa shiri don samun damar tashar jiragen ruwa 8000.

Lokacin da aka ɗora duk abin da kuke buƙata, bude burauzar yanar gizon ku kuma zuwa http://localhost:8000 o http://IP-de-tu-servidor:8000 kuma za ku ga shafin misalin da aka ƙirƙiri.

misali aikace-aikace

Ionic tsari ne na zamani wanda ke ba mu damar haɓaka aikace-aikacen giciye ta hanya mai sauƙi da kyawu. Ana iya samun sa ƙarin bayani da takaddun bayanai game da shigarwa da aiki a cikin aikin yanar gizo.


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

Kasance na farko don yin sharhi

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.