Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

templateUrl not working in directive if ngModel is required (1.2.0-rc.3) #4434

Closed
Hacklone opened this issue Oct 15, 2013 · 7 comments
Closed

Comments

@Hacklone
Copy link

templateUrl not working in directive if ngModel is required

I copied the same content in template and it worked.

Corresponding error: http://errors.angularjs.org/undefined/$compile/ctreq?p0=ngModel&p1=vatNumberInfo

Plunker: http://plnkr.co/edit/ZzNTVp

@dipold
Copy link

dipold commented Oct 15, 2013

I'm also getting this exception in all my directives which make use of ngModel, but unfortunately I'm not able to reproduce this exception in a Plunker
Related issue: #4430

@lhorie
Copy link

lhorie commented Oct 15, 2013

I get a $compile:ctreq error when creating an isolated scope with a parameter named ngModel, e.g. , even when not declaring a "require" argument in the directive options

http://plnkr.co/edit/HSmOWB0DTNUmSG18FpyK?p=preview

Only happens in 1.2.rc3

@IgorMinar
Copy link
Contributor

plunker for the original issue: http://plnkr.co/edit/aINJ8oV3BkuKBbpmH4ix?p=preview

but we also need to investigate @lhorie's case because at first glance it doesn't make sense for this kind of error to be thrown there.

@Hacklone
Copy link
Author

I created the issue in Plunker: http://plnkr.co/edit/ZzNTVp

@pheuter
Copy link

pheuter commented Oct 21, 2013

Seeing the same issue as @Hacklone on 1.2.0-rc.3

@ghost ghost assigned IgorMinar Oct 23, 2013
IgorMinar added a commit to IgorMinar/angular.js that referenced this issue Oct 23, 2013
When we re-enter compilation either due to async directive templates or element transclude directive
we need to keep track of controllers to instantiate during linking.

This piece of info was missing when re-entering compilation and that's what this commit fixes.

I also reordered the properties in the previousCompileContext object.

Closes angular#4434
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
When we re-enter compilation either due to async directive templates or element transclude directive
we need to keep track of controllers to instantiate during linking.

This piece of info was missing when re-entering compilation and that's what this commit fixes.

I also reordered the properties in the previousCompileContext object.

Closes angular#4434
Closes angular#4616
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
When we re-enter compilation either due to async directive templates or element transclude directive
we need to keep track of controllers to instantiate during linking.

This piece of info was missing when re-entering compilation and that's what this commit fixes.

I also reordered the properties in the previousCompileContext object.

Closes angular#4434
Closes angular#4616
@santosh-k1
Copy link

i am facing the problem in ng-routing ... when i call the links through directive and click the link to change the view but url has changed but page is same..here is below code 👍

MyApp.directive('rightsidemenu', function(){
        return{
            restrict: "AE",
            templateUrl:"view/right-side.html"
            }
        });

directive html code : <li><a href="#/driective">Use of restrict</a></li>

.when("/ng-directive",{templateUrl:'view/study/angularjs/use-of-driective.html', controller:'commonCont'})
         .when("/ajax-function",{templateUrl:'view/study/ajax/ajax-function-in-jquery.html', controller:'commonCont'})
         .when("/classRoom",{templateUrl:'view/study/angularjs/use-of-driective.html', controller:'commonCont'})     

@gkalpak
Copy link
Member

gkalpak commented Feb 22, 2016

@santosh-k1, it is not clear what your code does. If you think this is a bug with Angular, please open a new issue, explaining the issue and preferrably providing a live demo (e.g. using CodePen, plnkr etc).
Thx !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.