Php 使用angular在单击时更改包含的html文件
是否有一个角度的方法来改变文件的名称,我从中显示的内容在主标签?现在我正在使用php include函数:Php 使用angular在单击时更改包含的html文件,php,html,angularjs,Php,Html,Angularjs,是否有一个角度的方法来改变文件的名称,我从中显示的内容在主标签?现在我正在使用php include函数: <main> <?php include 'hello.html';?> </main> 但是,有没有一种“角度”解决方案可以将hello.html文件更改为lets say…再见.html?是的,它很简单。但我不理解您的场景,也无法向您展示PHP技术 用下面的方法, Index.html <main ng-init="loadPa
<main>
<?php include 'hello.html';?>
</main>
但是,有没有一种“角度”解决方案可以将hello.html文件更改为lets say…再见.html?是的,它很简单。但我不理解您的场景,也无法向您展示PHP技术 用下面的方法, Index.html
<main ng-init="loadPage()">
<div ng-include="{{url}}">
<div>
</main>
任何疑问都可以自由提问。。。
希望我能帮助…这对你有帮助
appModuleName.Controller("index",function($scope){ //appModumodleName is the name of your angular app module
$scope.loadPage=function()
{
// User your logic to get your desired HTML page url.....
$scope.url="hello.html"; //or path toward your hello.html
}
});