2

As being a Backend Developer myself, I have been maintaining a Knockout SPA project for about a few months which is built on Boilerplate.js where the routing is handled by Crossroads.js. And I would like to gradually migrate to Angular 2+ if possible.

Training myself and improving my skills on Angular 2+ sounds like a better plan. However I have quite a few things which I can not foresee myself, so I felt like asking these questions to public for any feedback you could provide.

  • Has anyone used Angular 2(+) with Knockout before? Since ng-controller etc got removed along the way to Angular 2, is it still possible to get those two libraries working?
  • Is it possible to replace Angular routing with any other routing libraries?
  • Since I have Crossroads handling the routing for me with the current setup, is it possible to get the routing lib working in collaboration with Angular routing?
  • If I can find a way to replace Crossroads or Angular routing, I am thinking of wrapping every single module inside an Angular Component to consume the functions etc. Is it a good practise or what would your approach be in this case?

I would really appreciate any suggestions, guidelines or tutorials if there are any. Thanks in advance,

stckvflw
  • 329
  • 3
  • 10
  • To the best of my knowledge, Angular 2+ has all of the features knockout has. Ideally you would want to just go full angular. – John Pavek Jul 26 '17 at 17:04
  • 1
    @JohnPavek I would like to migrate my application module by module since it is not a personal project but an enterprise application already in use and being developed still. Moving to Angular 2+ at once is my last choice for now :) – stckvflw Jul 27 '17 at 07:10
  • it's been awhile, but what did you end up doing? – JasonlPrice Jul 16 '19 at 17:25
  • 1
    Thank you for bringing this to my notice @JasonlPrice I have forgotten about this post. What I did was quite easy to be honest. I am running KO and NG together in the same application for about a year now, migrating slowly. Simply placed my tags in my index.html which then is replaced by the router-outlet rendering my NG components. To be able to get the routing working I did some tricks an started all routes with "ng-" etc. – stckvflw Jul 17 '19 at 20:15

0 Answers0