laxa1986 / gulp-angular-embed-templates

gulp plugin to inject angular templates into js code
MIT License
31 stars 20 forks source link

Dynamic templateUrl cannot be detected. #39

Open nasersobhan opened 4 years ago

nasersobhan commented 4 years ago

in angularJS, I am trying to have a dynamic templateUrl (all places, directives, mdpanels anywhere with templateUrl) it's working if I use a static link like templateUrl : 'MyApp/templates/view.html',

but if I use it as variable or dynamic it's not working I think it's something to do with gulp

templateUrl: function(){
return 'MyApp/templates/view.html';
}

or

var tempUrlVar= 'MyApp/templates/view.html'
templateUrl: tempUrlVar

not working.

nasersobhan commented 4 years ago

I fixed it with the below code for now. image