Here's your code in working 
form https://plnkr.co/edit/VzuopVilmDK5sQaQcoDh?p=preview

Couple of things:
1. you need to downgrade the ng2 component as well, because a hybrid ng1 + 
ng2 app would start as an ng1 app only.
2. your ng2 component was using templateUrl instead of template, even 
though it was giving an inline template.


On Thursday, January 14, 2016 at 12:01:34 PM UTC+5:30, Abhi wrote:
>
> I am using UpgradeAdapter to use an angular1 directive in my angular2 app. 
> I followed the steps mentioned on angular2 upgrade guide 
> <https://angular.io/docs/ts/latest/guide/upgrade.html>
>
> See this plunk <https://plnkr.co/edit/qQMTa3IpUsREZvpaNmBH> for code. It 
> is resulting me into this error -
>
> EXCEPTION: No provider for $scope! (function (scope, elementRef) { -> $scope)
>
> I have an angular1 directive which is element type, with controllerAs 
> style. Also I am not using $scope in the controller code. I am trying to 
> use this angular1 directive within my angular2 app.
>
> So I instantiate the UpgradeAdapter and call upgradeNg1Component method on 
> it with argument as name of my angular1 directive and I pass it in the 
> directive input for my angular2 component.
>
> But then it results in the above error.
>
> Any clue what I may be missing?
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to