Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
David Gang
@david-gang
one option i thought is just to use the bundle function
so instead of bootstrap(AppCtrl);
i will bumdle it
and then i can use it with ngupgrade
this is the easiest option
what do you think?
bundle('my.app', AppCtrl).

import {UpgradeAdapter} from 'angular2/upgrade';

var adapter = new UpgradeAdapter();

adapter.bootstrap(document.body, ['my.app']);
but i find
this is a bit ugly
David Gang
@david-gang
do you have a better idea?
another question is, do i have to store the adapter in a certain global variable/module
must the adapter be a singleton?
the other part is then the interaction between the angular2 and angular1 objects
i mean ng-forward
do we have to explicitely upgrade and downgrade them?
I have a mindset of how to use ng-forward with ng-upgrade
but i am not sure that it will be the most convenient way
@timkindberg - I would like to hear what your vision about this is .
Tim Kindberg
@timkindberg
Yes bundle.
Pls email me to have deeper char
Chat
David Gang
@david-gang
ok
Tim Kindberg
@timkindberg
Timkindberg gmail
David Gang
@david-gang
with a big T?
capital
Tim Kindberg
@timkindberg
Lower sorry
David Gang
@david-gang
ok
Tim Kindberg
@timkindberg
Yeah sorry I'm busy at the moment and I know I'll forget to respond if it's not email :(
David Gang
@david-gang
:-)
I am writing the mail
Nathan Erickson
@Luwdo
Hey, I was wondering that when injecting $scope as expected the functions that get attached to the $scope.ctrl from your ng-forward component won't be there
is there a work around other then assigning them manually for example:
this.$scope.ctrl.edit = this.edit;
Yves Serrano
@yvess
I everbody switching to angular 2 RC1 instead of using ngforward? Last release is from january and last commit from begin of february
Jay
@jjstrat3
Yea, I was wondering the same. I'm not seeing much recent activity
I and others on the front-end at the company I work for are maintaining 5 med to large Angular 1 web applications, and we're currently trying to plot a course forward to transitioning them to Angular 2
So far we've come up with this: 1. Switch to TypeScript 2. Update build system and tooling to use npm over bower. 3. Start migrating existing code to component style 3. Use ng-upgrade to "up convert" existing Angular 1 code and write new features in Angular 2
Jay
@jjstrat3
And maybe as a fourth item migrate to angular-CLI when it's out of beta?
Excuse me... Fith step 😉
Haven't gotten my coffee yet
Tim Kindberg
@timkindberg
Yes this project is not actively developed anymore (not that you couldn't fork it ;)
For the features that ARE there, they are extremely well tested, so its just a matter of adding what you need if you decide to use it
It window of usefulness goes down more and more close to a V1 of angular 2
Jay
@jjstrat3
Thanks for the info @timkindberg
Jean-François Veillette
@jfveillette
I need help for unit testing configuration/setup in an hybrid (angular-1 project to angular-2). Upgrading to Typescript is not yet an option. Moving from grunt either (many custom build plugins). Ideally I would integrate to the existing Jasmin unit test.
I am to the point where I successfully added an Angular-2 component into the application (Angular-1 base). It is now an hybrid application.
Now I need to write unit test for it (the new angular-2 component), but can't figure out how to run the thing in the current jasmin setup.
Jean-François Veillette
@jfveillette
@jjstrat3 did you made the conversion? Are you able to unit-test your new angular-2 component in your hybrid project?