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

12th
Oct 2016
Swapnil Tripathi
@Anshdesire
Oct 12 2016 08:49
can any one suggest me how to add LazyLoadImageModule into ionic2 ?
Alex
@Alx101
Oct 12 2016 14:03
Woop woop
Alex
@Alx101
Oct 12 2016 14:27
Just putting a question out there, but does anyone know if it is possible to opt out of the AoT compilation?
Stephan Kristyn
@nottinhill
Oct 12 2016 14:36
Any idea when Ionic2-RC1 will be release? Lookoing forward to this feature: http://ionicframework.com/docs/v2/api/navigation/DeepLinker/
@tleguijt Yes agree and at no point Ionic2 Doc says to declare all vars as private. You clearly misread the relative sentence. :)
Alex
@Alx101
Oct 12 2016 14:44
Anybody? I guess not
Stephan Kristyn
@nottinhill
Oct 12 2016 14:49
Yes you can opt now I think. But why do you want to do that?
@robwormald Thanks man!
Fabien BERNARD
@fabien0102
Oct 12 2016 16:06
Hi! Just a simple question, how can I add a third-party with @types?
I see "@types support for third-party libraries" into ionic change log, but when I make npm i --save lodash && npm i -D @types/lodash, lodash does’nt works…
What I missed ?
Alex
@Alx101
Oct 12 2016 16:28
@nottinhill It would be really REALLY benificial for my project to be able to use the compiler of Angular
doing some magic with dynamic templates
With the AoT, this breaks in production
it would save me hours upon hours of work just being able to use the Runtime Compiler
though I want to be sure what I am missing out on. Is there anything but package size and load-times that are affected by disabling the AoT?
and how do you do it?
Rob Wormald
@robwormald
Oct 12 2016 16:32
@Alx101 you dont want to do it
especially on a mobile device
Stephan Kristyn
@nottinhill
Oct 12 2016 16:34
I will be able to give feedback on our 100 page project and AoT when it compiles on a device by end of next week
Alex
@Alx101
Oct 12 2016 17:13
@robwormald Why? It wasn't part of ionic before the release candidate, why would it be so bad now?
Stephan Kristyn
@nottinhill
Oct 12 2016 17:16
Can anybody help me with a basic observable
Lets say I have a service (navRouter) and I want the method's service to be triggered, whenever in another Service (navService) a method gets called?
Should I do this with listenener?
Kyle Roach
@iRoachie
Oct 12 2016 17:18
@Alx101 Yea that's why it was before release candidate. Ionic wouldve never shipped as full product without aot compilation, cause the app would be too slow. Even Ionic 1 had better performance and speed. So AoT was always coming, and was aprt of the roadmap
@nottinhill Is there any reason you can't call the method when the other service calls its method?
Alex
@Alx101
Oct 12 2016 17:20
@iRoachie I see. Damn, more work for me
Kyle Roach
@iRoachie
Oct 12 2016 17:21
@Alx101 Hah it would help you break your client and server from being to tightly coupled
Stephan Kristyn
@nottinhill
Oct 12 2016 17:21
@iRoachie Yes. I use Ionic's "Nav" module.
When I directly invoke Nav module in Main NavService which other Components use, then we break for circular dependencies.
Alex
@Alx101
Oct 12 2016 17:22
@iRoachie perhaps, but since they're built for each other, I don't see the issue
Kyle Roach
@iRoachie
Oct 12 2016 17:23
@nottinhill Can you like sketch a quick diagram? So we can see like the structure?
Stephan Kristyn
@nottinhill
Oct 12 2016 17:23
We solved this crap problem over more sophisticated navigation by using "require" module in beta11. Now I read that RollUp does not like "require" lazy loading anymore. We can't wait until RC1. We have immense financial pressure to get dynamic navigation going until Sprint Demo on Tuesday
Kyle Roach
@iRoachie
Oct 12 2016 17:25
@nottinhill I think you can configure rollup to help you. Someone form the ionic team helped me with third party libraries that use require using a custom config for rollup
Stephan Kristyn
@nottinhill
Oct 12 2016 17:25
This is how it worked:
 case NavTargetEnum.CONTRACT_INVESTMENT_INFO:
                return require("../../../+contract/contract-investment-info/contract-investment-info.component")["ContractInvestmentInfoComponent"];
Stephan Kristyn
@nottinhill
Oct 12 2016 17:31
@iRoachie You think pushing require declarations to npm will work or more work be needed? http://ionicframework.com/docs/v2/resources/third-party-libs/
Alternatively I imagined a listener would work to not have circular dependency on NAV module.
I must say, it was quite stupid from us that we did build on beta app where Navigation was not figured out yet. I hope RC1 comes very very soon. It can't come fast enough.
Rob Wormald
@robwormald
Oct 12 2016 18:07
rollup is a hard tradeoff, but the performance is just unbeatable
Stephan Kristyn
@nottinhill
Oct 12 2016 18:48
What exactly is RollUp?
This message was deleted
Kyle Roach
@iRoachie
Oct 12 2016 18:49
Tool we use to bundle everything together, minify js, minify css, linting, etc
before we had gulp
Stephan Kristyn
@nottinhill
Oct 12 2016 18:52
Ic...
So any idea how to implement require in there?
Rob Wormald
@robwormald
Oct 12 2016 18:54
you'd need to use the commonJS plugin
but in your own code, there's no reason to use require
Stephan Kristyn
@nottinhill
Oct 12 2016 18:57
@robwormald yea I want to follow best practice too, but in ionic2 rc0, how do you navigate with Nav Method from a service without requiring comonents?
Rob Wormald
@robwormald
Oct 12 2016 18:59
why wouldn't you just import them as normal, and return them from the switch?
that service itself is imported in the components, in ALL components
with require it worked
with directly returning the component in the service it breaks
I am not favoring the require solution
Stephan Kristyn
@nottinhill
Oct 12 2016 19:17
@robwormald
Obed Osei Frimpong
@oseifrimpong
Oct 12 2016 21:38
hello guys, I am trying to import the router package but am getting "Cannot find module router". any idea as to how to fix this. I have searched on google but to no avail. P.S: am using beta.11