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

20th
Oct 2016
Stephan Kristyn
@nottinhill
Oct 20 2016 01:13
@smakinson You need to use index.html to use external JS file, then declare in declarations.d.ts.
I have a question, how can I clean out www folder on each build, here is what I tried: https://forum.ionicframework.com/t/how-to-configure-rollup-or-ionic-copy-script-to-clean-whole-www-directory-on-each-build/67554
@smakinson e.g.: declare var Minilog: any;
@iRoachie haha crazy you, thanks a lot for the screencast. My mistake was that ttf is not working. I am using now binary font files then it worked, e.g.:
@font-face {
    font-family: 'Marvel-Bold';
    src: url('../assets/fonts/Marvel-Bold.woff');
    font-weight: bold;
    font-style: normal;
}
$base-font-bold: "Marvel-Bold";
Stephan Kristyn
@nottinhill
Oct 20 2016 01:19
btw. what do you have in globals.scss and is that file actually found by @import "ionic.globals"; command in your case? http://prntscr.com/cwhp33
Stephan Kristyn
@nottinhill
Oct 20 2016 02:06
Anybody know how to delete WWW Directory on each build?
Jade
@zjhiphop
Oct 20 2016 02:09
How about: “clean:before": "rm -rf www; build” ?
@nottinhill
Kyle Roach
@iRoachie
Oct 20 2016 04:20
@nottinhill My global.scss has the scss files for the different pages
Justin
@soupman99
Oct 20 2016 05:05
looking for tutorial that can help me get karma+jasmine setup to work with both angular2 & ionic 2? Spent the whole day and found nothing that actually works. Anyone have a helpful link?
Alex
@Alx101
Oct 20 2016 08:25
@vinodhum well a toggle would be great as long as there are only two values to switch between ;) I want to be able to have more than two in there. I solved my issue with another solution, however I still think that the range has weird behaviour. It should limit the position of the "ticks" to be ON the bar and not go outside
In other news, anyone know a good way to make a custom version of the detail-push attribute on an ion-item?
Vladimir Tolstikov
@bobrosoft
Oct 20 2016 10:35
@soupman99 same question, but I not yet tried for Ionic 2
@soupman99 at least e2e tests with protractor should be normally possible to setup
Merel Staal
@Merel1988_twitter
Oct 20 2016 10:36
I have an Angular 2 app and an Ionic 2 app and I configured the routes in exactly the same way. But for some reason if I refresh the browser in my Ionic app it says : page not found, but It's working fine in my Angular app. Anyone knows a solution?
Vladimir Tolstikov
@bobrosoft
Oct 20 2016 10:39
@Merel1988_twitter I just started switching some functionality from ng2 to Ionic 2 and found DeepLinker there. There's no other normal way to setup routes as I found, so check it http://ionicframework.com/docs/v2/api/navigation/DeepLinker/
then you will be able to open your page directly with http://localhost:8100/#yoursegmentname
Merel Staal
@Merel1988_twitter
Oct 20 2016 10:42
Thanks!
Carlos Esteban Lopez Jaramillo
@luchillo17
Oct 20 2016 15:24
Anyone knows what's up with this error? :Error: Can't resolve all parameters for VerifyProvider: (?, ?, ?)
Carlos Esteban Lopez Jaramillo
@luchillo17
Oct 20 2016 15:31
Oops, forget about it, i found why, missing @Injectable() annotation, i missed it in that single provider.
jayh92
@jayh92
Oct 20 2016 16:16

After updating to the latest Ionic version has anybody experienced CLI build issues? For example, when running 'ionic build ios' I get the following error:
[12:10:41] uglifyjs failed: SyntaxError: Unexpected token: name (ScheduleService)
[12:10:41] ionic-app-script task: "build"
[12:10:41] Error: SyntaxError: Unexpected token: name (ScheduleService)

If I comment out the usage of that Service then it just keeps finding more of the same errors ("Unexpected token: name (abc123)").

Merel Staal
@Merel1988_twitter
Oct 20 2016 16:28
@jayh92 I think it has something to do with typings
jayh92
@jayh92
Oct 20 2016 19:21
Thank you @Merel1988_twitter. It was because I had both "@types" and "typescript" in devDependencies in my package.json
Stephan Kristyn
@nottinhill
Oct 20 2016 21:45
Anybody fluent with ionic-app-scripts in package.json? How to make sure that with each ionic build command the www folder is cleaned out? A trivial task if you ask me...