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

21st
Sep 2016
Juan Heredia
@jherediagu
Sep 21 2016 08:14
its because http.get need a promise
this.http.get(url)(res => res.json());
sorry
this:
````
 this.http.get(URL)
            .subscribe(data => {


                this.data = data.json();


            }, error => {

            });
Caesar
@slimeball
Sep 21 2016 09:24
could i use angular2 template in ionic2 to custom my own component?
i type code like this ,but show me a black screen with a style background:#000;
@Component({
  templateUrl: 'build/pages/home/home.html',
  selector: 'my-app',
  template: `<h2>1111</h2>`
})
adirzoari
@adirzoari
Sep 21 2016 09:32
@jherediagu where I do this http.get(Url) in my login component or httpservice ??
Kyle Roach
@iRoachie
Sep 21 2016 11:34
@slimeball you can't use both a template URL and a template
Caesar
@slimeball
Sep 21 2016 12:14
@iRoachie oh~ thank you ~ :^)
Juan Heredia
@jherediagu
Sep 21 2016 12:22
@adirzoari wherever you want
Kyle Roach
@iRoachie
Sep 21 2016 15:30
@adirzoari it's better to put it in service. Components shouldn't directly interface with with data services. Note this is just a best practice, you can decide how best to do it. I recommend you checking the style guide on the website
Valentyn Shybanov
@olostan
Sep 21 2016 19:52

Anyone tried starter kits with ionic 2.1.0-beta.2? I can't get styles compiled - getting

22:50:39]  sass started ...
(node:77736) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Path must be a string without null bytes

I've used base+blank starters from beta12 branches... May be I should use other?

Benedikt Berger
@bergben
Sep 21 2016 20:04
Hey guys.
I have been working on a library to trigger animations on scroll. Just wanted to let you know if anyone is interested in that sort of thing. You can check out the demo here https://bergben.github.io/ng2-scrollimate/ or the repository here https://github.com/bergben/ng2-scrollimate.
Rob Wormald
@robwormald
Sep 21 2016 21:14
@bergben cool stuff. you might look at the IntersectionObserver API if you haven't
Benedikt Berger
@bergben
Sep 21 2016 21:16
nice @robwormald thanks for the tip. Didn't know about that API!
Rob Wormald
@robwormald
Sep 21 2016 21:17
its brand new, there's a polyfill available. designed for this sort of use case
(and its suuuper performant)
Benedikt Berger
@bergben
Sep 21 2016 21:18
the polyfill would make it work in all browsers?
Rob Wormald
@robwormald
Sep 21 2016 21:19
yeah. tho obviously not as well as where its native
(but no worse than whatever else you're doing to compute it)
Benedikt Berger
@bergben
Sep 21 2016 21:20
yes of course. That is awesome. Definitely gonna have a look into that when I got some spare time since it would boost the performance as you suggest indeed
Christophe Durieux
@codedumper
Sep 21 2016 23:29
Can we use ionic2 to build regular app and mobile with the same code ?
Or only multi mobile devices ?
Kyle Roach
@iRoachie
Sep 21 2016 23:47
What do you mean by regular app?
Christophe Durieux
@codedumper
Sep 21 2016 23:55
Web app on computer ?
@iRoachie can i have same app on computer and mobile devices using ionic 2 ?
Kyle Roach
@iRoachie
Sep 21 2016 23:58
@codedumper Yes! The only thing is that some of the plugins from ionic native won't work since they only work on a mobile device