These are chat archives for angular/angular-2-ionic-2

18th
Feb 2018
Erebosi Favour
@promisemartins
Feb 18 2018 06:11
Hello
UncertaintyP
@UncertaintyP
Feb 18 2018 16:36
So how is your project going @OwenMelbz ?
Owen Melbourne
@OwenMelbz
Feb 18 2018 16:49
ha well @UncertaintyP tbh, I gave up soon after that last message, I'm only really doing preliminary research as we've not even signed the contract with client, I just needed to figure out what can be done. So i'd started recreating a native app we already have, using a laravel api that is battle tested to see how to do certain things, I did bin off the angular http client as its overly complicated for whats needed, a simple axios replacement worked a treat. I think my biggest concern really is the wiring it all up together, e.g injecting providers etc seems more complicated than it needs to be. I'm also worried about how to go down the route of making little components. e.g if we have a feed like twitter, each tweet is normally its own component with its own logic etc. Need to figure out the best way to get something like that working that is not a "page"
also i cant get the path aliases to work, so instead of doing like import * from '../../../pages/home/home' can do @pages/home/home
so if you can make any suggestions there, would be good :D
gonna spend some time afternoon seeing how easy to setup facebook/google logins
UncertaintyP
@UncertaintyP
Feb 18 2018 17:07
Injection of providers is done like in Laravel, you import them and just typehint them in your page/component constructor.
Little components are just called Components in Ionic/Angular ( there is a good ( but quite advanced ) example app that rebuilds twitter juts like in your example ;) https://github.com/shprink/ionic-angular-twitter-pwa . It has an additional data layer, a reactive store, pretty much like a react store which is similar to vuex. However this app is highly optimized for browser and not for a mobile app (things like ahead-of-time compilation for pages and components is missing or optimized change detection).
The @ alias will work in dev but I had problems compiling in prod mode (the ngc compiler will complain about it so I used a workaround, dunno if there is an actual solution to this problem)
I know the dots are ugly but I live with them, usually creating an index.ts on the root (that is either in pages or components or providers) that export every Module it has so you end up with sth like this
import {
  AppLoaderProvider,
  AuthProvider,
  EventDataProvider,
  G,
  LocationDataProvider,
  PhotoDataProvider,
  UserDataProvider
} from '../../providers'
Owen Melbourne
@OwenMelbz
Feb 18 2018 17:15
guess used to anything within the "App" namespace is available, without importing, and now with autoloading of vendor service providers lol
Owen Melbourne
@OwenMelbz
Feb 18 2018 17:27
okay quick question then... is there a way to run ionic cordova run browser with live reload etc?
UncertaintyP
@UncertaintyP
Feb 18 2018 17:27
ionic serve
Owen Melbourne
@OwenMelbz
Feb 18 2018 17:27
that doesnt inject cordova.js though
UncertaintyP
@UncertaintyP
Feb 18 2018 17:27
oh on a device not a browser, uh yeah there is lemme have a quick look ^^
Owen Melbourne
@OwenMelbz
Feb 18 2018 17:28
tryna use the facebook login package
UncertaintyP
@UncertaintyP
Feb 18 2018 17:30
ionic cordova run <platform> -l
The live reloader of ionic is not the best, sometimes you end up with partial code from some reloads before. It's quite fun to work with it :D
Owen Melbourne
@OwenMelbz
Feb 18 2018 17:34
hmm cant seem to get it working, it makes port 8000, 8100, 8003 all active
but none are reloading for me.. hmm
i guess it works in the sense of i can F5 the page and i get the changes
just doesnt inject
Owen Melbourne
@OwenMelbz
Feb 18 2018 17:47
boo cant get that to work lol
Owen Melbourne
@OwenMelbz
Feb 18 2018 17:59
hmm this surely cant be right lol, no way you're expected to restart the command each time you make a change lol
UncertaintyP
@UncertaintyP
Feb 18 2018 17:59
I had it working some time ago ( I usually don't use it ) but now it gives my a plugin_not_installed error :laughing:
Owen Melbourne
@OwenMelbz
Feb 18 2018 18:02

i can see in the console it

~/Sites/social on  master [!?] took 3m 31s
➜ ionic cordova run browser -l
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703
--nobrowser --iscordovaserve --platform browser --target cordova - Ctrl+C to cancel

but just doesnt seem to actually do it

UncertaintyP
@UncertaintyP
Feb 18 2018 18:05
Oh running on the browser platform, I never done this ^^
Owen Melbourne
@OwenMelbz
Feb 18 2018 18:06
yeah need web/android/ios - projects simple, but wanted to use the facebook n google login
UncertaintyP
@UncertaintyP
Feb 18 2018 18:30
@OwenMelbz You should join https://ionicworldwide.herokuapp.com/ too (its the official slack of ionic) and there is one of the developers active (though not today I guess ^^)
Owen Melbourne
@OwenMelbz
Feb 18 2018 18:33
oh i did see that, but i like the simplicity of gitter, all in 1 place lol, no faffing with different servers/channels lol
Erebosi Favour
@promisemartins
Feb 18 2018 18:36
Hello room
UncertaintyP
@UncertaintyP
Feb 18 2018 18:37
Yeah I totally understand the hassle with slack :D
Hello @promisemartins
Owen Melbourne
@OwenMelbz
Feb 18 2018 18:44
im in it anyway :P never know when you will need it haha, right now im making progress, for fb working with a laravel api flow, now to see if google works, still cant get live reload to work
ah boo now trying to run on ios and get [18:46:17] typescript: src/app/app.module.ts, line: 5 Cannot find module '@ionic-native/status-bar'.
actually, it cant find any of them... hmm
UncertaintyP
@UncertaintyP
Feb 18 2018 18:50
aren't they present in your node modules?
Owen Melbourne
@OwenMelbz
Feb 18 2018 18:50
dno just nuked the thing and trying again
seems getting further this time
good ol nuke the node_moules
UncertaintyP
@UncertaintyP
Feb 18 2018 18:52
works 60% of the time, everytime :D
Owen Melbourne
@OwenMelbz
Feb 18 2018 19:16
hmm anybody else unable to npm install --save @ionic-native/google-plus getting a npm error saying some things are not found
UncertaintyP
@UncertaintyP
Feb 18 2018 19:19
+ @ionic-native/google-plus@4.5.3
worked
Owen Melbourne
@OwenMelbz
Feb 18 2018 19:20
hmm same error
yarn seems to be doing it okay...
Owen Melbourne
@OwenMelbz
Feb 18 2018 19:31
something must be up, now getting Error: exec proxy not found for :: GooglePlus when trying to use it
Owen Melbourne
@OwenMelbz
Feb 18 2018 19:45
grr gonna give up on this in a min, hate it when you get these unexplainable issues that are nothing todo with you lol
Owen Melbourne
@OwenMelbz
Feb 18 2018 19:55
riiiight, maybe will just bin off google+ seems loads of issues on the github
UncertaintyP
@UncertaintyP
Feb 18 2018 19:57
Tell me when you find a plugin without loads of issues :D
Owen Melbourne
@OwenMelbz
Feb 18 2018 19:57
:(