Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Example unit tests with AngularJS

I am new to Ab gulag but not new to unit testing.

Please give some examplea for unit testing with Angular legacy and Angular 2

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

THanks.

I am trying to learn Anguluar urgently to fill a gap
As a .Net Full stack developer.

Should I jump into Angular 2 or try and do both
1.5 and 2?
Difficult questions you ask.

Angular 1.5 is a bridging version - it includes components which is the basis for 2. Angular 2 requires you learn typescript as well.

I am doing both at the moment. I started with 1.1 and went to 1.5 but at the same time I have been keeping track of 2 waiting for it to stablise - which I believe it has.

Here is the main advantage of using 2 - because it is Typescript based it allows for much more structured development. JavaScript is not a good language for developing large applications in - because of its loose typing and leniency toward coding omissions - the larger the code base the more difficult it becomes to manage.

This is where Typescript makes a big difference. It bring types and with MS Code you gain a whole bunch of advantages as the editor is aware of your code and makes refactoring and other such processes a lot easier.

From that perspective I would push Angular 2 over 1.5.