Ng-include页面嵌套

1.1. Ng-include页面嵌套

1.1.1. 功能介绍

点击页签,页签下的各页面不写在同一个html中,可以分成n个html并将其嵌套进入其中

1.1.2. 代码

(1) 分开在htmljs中写

<ion-content id="content" style="bottom:60px;line-height:34px;margin-top: 50px;">
        <div ng-include="testData" style="height: 600px;"></div>
    </ion-content>
Js
$scope.testData = "templates/HomePage/Person/personDetail/personDetailInfoReadOnly.html";

(2) 直接写在html中(谨记直接写在Ng-include里面的时候,双引号里面要有单引号)

<div ng-include="'templates/HomePage/Person/personDetail/personDetailInfoReadOnly.html'" style="height: 600px;"></div>

猜你喜欢

转载自www.cnblogs.com/Amanda-w/p/11648010.html