AngularJS : ng-include not working inside dynamic html -


i new angularjs. trying use ng-include directive dynamically not work. example

var template = '<div ng-include="/app/partials/htmlpage.html"></div>' 

from angular docs:

if source string constant, make sure wrap in quotes, e.g. src="'mypartialtemplate.html'".

try adding inner quotes string template name.

var template = '<div ng-include="\'/app/partials/htmlpage.html\'"></div>'

(notice have escape inner quotes since you're in string)


Comments