Tuesday, 25 April 2017

Code changes in ionic 1 and 2


This is another preference thing for me because the template syntax between Ionic 1 and Ionic 2 is extremely similar. It looks a little weird and quirky at first but I find the template syntax in Ionic 2 to be cleaner. Let’s take a look at a couple of examples:

Ionic 1:

<img ng-src="{{image_url}}"/>

Ionic 2:

<img [src]="image_url"/>


class HelloWorld {

So in order you to  move from ionic 1 to ionic 2, there are several aspect you need to take important of , these are the list :

1) ECMAScript (ES6)
2) Angular JS 2
3) TypeScript

References :


No comments:

Post a Comment