problem description
because you need to generate multiple pages dynamically, you can"t use ng-view,. I want to control multiple transaction pages through ng-include.
I use
var $el=$(`<ng-include src=""html/TransRecheck/mod.html""></ng-
include>`).appendTo($("-sharpmenu_content"));
$compile($el)($scope);
but it is not successful. The page shows
, and the browser network does not see the request page
the environmental background of the problems and what methods you have tried
I have tried < ng-include src= """ > < / ng-include > and < div ng-include src= ""> < / div >, and none of them works.
has also tried various changes to the paths within src.
but if I write it directly in html, it is successful
<div id="menu_content">
<ng-include src=""html/TransRecheck/mod.html""></ng-include>
</div>
this will run perfectly
related codes
html fragment page is as follows (part)
app.html:
<div id="menu_content">
</div>
instruction:
var $el=$(`<ng-include src=""html/TransRecheck/mod.html""></ng-
include>`).appendTo($("-sharpmenu_content"));
$compile($el)($scope);
I saw through the breakpoint that the first statement was actually successful. He successfully married the tag to the specified location, but after running the second statement, the tag became