Apologies for the newbieness of this question.
I’ve just followed through the crash course video for ionic 2.
I noticed it was all using Typescript.
I was interested in Ionic cos it appeared I could reuse some Angular code with Ionic apps.
I’m not sure I understand what this means.
Will I be able to include things like the angular-nvd3-directives in an Ionic 2 app??
(we have custom directives we wrote etc…)
Apologies if this all sounds a bit simplistic… I’ve no experience of typescript but I do need to know what I’m getting into.
If I spend 3 weeks learning Ionic 2 and then can’t use code we already have then I’ll have a lot of explaining to do…
That link you provided is Angular 1. Ionic 1 uses Angular 1, so if you want to use that exact directive you need to use Ionic 1, where it will most likely work just fine.
Ionic 2 uses Angular 2. Angular 2 is completely different from Angular 1 and has no backwards compatibility. You can not use anything from Angular 1 in Angular 2, you must rewrite it.
If someone made an Angular 2 version of that you are good to go. If not though you are out of luck.
Depends on which libraries you are using, you can find typings or fidle with
declare var something; to use certain JS things in Ionic2.
But when it comes to Angular1 directives, you’ll have to find the ng2 counter parts or rewrite your own.
Check out ionic generate - Ionic CLI Documentation to quickly generate scaffolding for components, services or pipes
I checked out the link you posted if you want to use charts i’ve been happy with highcharts
Thanks to both of you for your patient responses.
I know I’m displaying a shocking lack of knowledge here…
Ok, so right I can’t use Angular 1 directives.
But if there are Angular 2 versions of directives/modules then I can just use those … correct?
Thanks again for the patience, I’m just trying to dip my toe in before I commit.
I’ll get hell if I pick the wrong direction (Onsen, Ionic 1, etc)