AngularJs练习Demo10 ngInclude
@{
Layout = null;
} <!DOCTYPE html> <html>
<head>
<meta name="viewport" content="width=device-width" />
<title>ngInclude</title>
<script src="~/Scripts/angular.js"></script> </head>
<body>
<div ng-app="myApp">
<script type="text/ng-template" id="tpl.html">
@*AngularJS定义模板必须放在ng-app内*@
Content of the template
</script>
<script type="text/ng-template" id="tpl2.html">
@*AngularJS定义模板必须放在ng-app内*@
Content of the template2 </script>
<div ng-controller="firstController">
<div ng-include="url"></div>
<div ng-include="tpl"></div>
<div ng-include src="tpl2"></div>
</div> </div> <script type="text/javascript">
var app = angular.module("myApp", []);
app.controller("firstController", function ($scope) {
$scope.url = "/Angular/ngInclude1";
$scope.tpl = "tpl.html";
$scope.tpl2 = "tpl2.html";
});
</script>
</body>
</html>
AngularJs练习Demo10 ngInclude的更多相关文章
- AngularJS Best Practices: ng-include vs directive
For building an HTML template with reusable widgets like header, sidebar, footer, etc. Basically the ...
- AngularJs学习笔记(2)——ng-include
编写html文档的时候,为了实现代码模块化,增加复杂页面的代码可读性和可维护性,我们常常会想到将代码分散写入不同的HTML文件 angularJS里面的ng-include指令结合ng-control ...
- AngularJs 的ng-include指令的使用
AngularJs通过指令ng-include来将页面中共用的模块分离出来,这个功能和mvc里面的分部页的作用一样的. 先看文件的结构: 父页面: <!DOCTYPE html> < ...
- AngularJs之九(ending......)
今天继续angularJs,但也是最后一篇关于它的了,基础部分差不多也就这些,后续有机会再写它的提升部分. 今天要写的也是一个基础的选择列表: 一:使用ng-options,数组进行循环. <d ...
- AngularJS 包含
在 AngularJS 中,你可以在 HTML 中包含 HTML 文件. 在 HTML 中,目前还不支持包含 HTML 文件的功能. 大多服务端脚本都支持包含文件功能 (SSI: Server Sid ...
- AngularJS包含
1.在HTML中包含HTML文件:在HTML中,目前还不支持包含HTML文件的功能: 2.服务端包含:大多数服务端脚本都支持文件功能(SSI),使用SSI,你可以在HTML中包含HTML文件,并发送到 ...
- 原 ng-include用法分析以及多标签页面的简单实现方式
Demo:http://webenh.chinacloudsites.cn/Default/Demo2 在平时的项目开发中,应该会经常遇到上图所示的需求,就是在一个页面中有多个标签,被选中的标签颜色会 ...
- AngularJS(13)-包含
AngularJS 包含 使用 AngularJS, 你可以使用 ng-include 指令来包含 HTML 内容: 实例 <body> <div class="conta ...
- AngularJS学习笔记5
11.AngularJS HTML DOM ng-disabled 指令直接绑定应用程序数据到 HTML 的 disabled 属性. <button ng-disabled="my ...
随机推荐
- Oracle 执行计划(Explain Plan)
如果要分析某条SQL的性能问题,通常我们要先看SQL的执行计划,看看SQL的每一步执行是否存在问题. 如果一条SQL平时执行的好好的,却有一天突然性能很差,如果排除了系统资源和阻塞的原因,那么基本可以 ...
- JS将图片文件转为64位字符串再post到接口上传图片
HTML: <div class="ai-item upload-id-img"> <p>上传身份证照片</p> <div class=& ...
- web前端工程师学习之路开启(前言)
web前端工程师需要掌握的所有技能 图解1: 图解2:
- (转)yum 和 apt-get 用法及区别
原地址:http://www.cnblogs.com/adforce/archive/2013/04/12/3017577.html 一般来说著名的linux系统基本上分两大类: 1 RedHat系 ...
- 《Boost程序库完全开发指南》读书笔记-日期时间
●timer库 #include <boost\timer.hpp> #include <boost\progress.hpp> 1.timer类 // timer类的示例. ...
- DSP TMS320C6000基础学习(3)——CCS v5软件开发环境搭建
================================================== DSP CCS工程文件构成 =================================== ...
- develop process
-f Option is dangerous, make sure that only do this on your own branch # When you starting coding at ...
- Python入门-----Windows安装
摘要:Python,windows安装 1.进入python的官方网站下载:https://www.python.org 点击Download,选择windows版本:
- C 语言简历一个文件夹 并自己输入字符 来取文件夹名字
int main(void) { FILE *fp; char ch,filename[10]; scanf("%s",filename); if((fp=fopen(filena ...
- ssm+jsp+自定义标签实现分页,可以通用(前端实现)
近期做了一些分页方面的开发,大致梳理一下 1 jsp页面上关于分页的代码 <tr> <td colspan="9"> <ule1:pagination ...