Part 35 AngularJS caseInsensitiveMatch and Inline Templates
In this video we will discuss 2 simple but useful features in Angular
- caseInsensitiveMatch
- Inline Templates
Let us understand these 2 features with examples.
caseInsensitiveMatch : The routes that are configured using config function are case sensitive by default. Consider the route below. Notice the route (/home) is lower case.
If we type the following URL in the browser, we will see home.html as expected.
http://localhost:51983/home
If you type the following URL, the you will see a blank layout page. This is because, by default routes are case-sensitive
http://localhost:51983/HOME
To make the route case-insensitive set caseInsensitiveMatch property to true as shown below.
To make all routes case-insensitive set caseInsensitiveMatch property on $routeProvider as shown below.
$routeProvider.caseInsensitiveMatch = true;
Inline Templates : The view content for the route (/home), is coming from a separate html file (home.html)
Should the view content always come from a separate html file. Not necessarily. You can also use an inline template. To use an inline template use template property as shown below.
At this point, when you navigate to http://localhost:51983/home, you should see Inline Template in action.
Part 35 AngularJS caseInsensitiveMatch and Inline Templates的更多相关文章
- 35.angularJS的ng-repeat指令
转自:https://www.cnblogs.com/best/tag/Angular/ 1. <html> <head> <meta charset="utf ...
- angularjs编码实践
AngularJS 是制作 SPA(单页面应用程序)和其它动态Web应用最广泛使用的框架之一.我认为程序员在使用AngularJS编码时有一个大的列表点应该记住,它会以这样或那样的方式帮助到你.下面是 ...
- AngularJs学习笔记--Understanding the Controller Component
原版地址:http://docs.angularjs.org/guide/dev_guide.mvc.understanding_model 在angular中,controller是一个javasc ...
- [sinatra] Just Do It: Learn Sinatra, Part One Darren Jones
1. Install sinatra gem gem install sinatra --no-ri --no-rdoc 2. Basic App #!/usr/bin/ruby require 's ...
- CodeForces 228D. Zigzag(线段树暴力)
D. Zigzag time limit per test 3 seconds memory limit per test 256 megabytes input standard input out ...
- Luogu P5296 [北京省选集训2019]生成树计数
Luogu P5296 [北京省选集训2019]生成树计数 题目链接 题目大意:给定每条边的边权.一颗生成树的权值为边权和的\(k\)次方.求出所有生成树的权值和. 我们列出答案的式子: 设\(E\) ...
- Elasticsearch 6.4基本操作 - Java版
1. Elasticsearch Java API有四类client连接方式 TransportClient RestClient Jest Spring Data Elasticsearch 其中T ...
- SAMTOOLS使用 SAM BAM文件处理
[怪毛匠子 整理] samtools学习及使用范例,以及官方文档详解 #第一步:把sam文件转换成bam文件,我们得到map.bam文件 system"samtools view -bS m ...
- ELK的sentinl告警配置详解
背景 sentinl的监控&告警是通过watch实现的. 一.Watch Execution 执行开始的时候, watcher为watch创建watch执行上下文. 执行上下文提供脚本和模板, ...
随机推荐
- P4357-[CQOI2016]K远点对【K-Dtree】
正题 题目链接:https://www.luogu.com.cn/problem/P4357 题目大意 平面上给出\(n\)个点,求第\(k\)远的点对距离. 解题思路 \(\text{K-Dtree ...
- c# 类型安全语言
所谓的安全性语言其本质是有关类型操作的一种规范,即不能将一种类型转换为另一种类型. c#作为一种安全性语言,允许合理的类型转换,但是不能将两个完全不同的类型相互转换. c#允许开发者将对象转换为它的实 ...
- JavaFx 监听剪切板实现(Kotlin)
原文地址: JavaFx 监听剪切板实现(Kotlin) | Stars-One的杂货小窝 软件有个需求,想要实现监听剪切板的内容,若内容符合预期,则进行相关的操作,就可以免去用户手动粘贴的操作,提供 ...
- 初探webpack之从零搭建Vue开发环境
初探webpack之搭建Vue开发环境 平时我们可以用vue-cli很方便地搭建Vue的开发环境,vue-cli确实是个好东西,让我们不需要关心webpack等一些繁杂的配置,然后直接开始写业务代码, ...
- 未来云原生 | CIF 论坛精彩看点
当下云原生技术正在飞速发展,那么如何准确理解「云原生」?在发展不够成熟,行业认知差异大的情况下,不论是云原生计算基金会(CNCF),还是行业的任何大咖,都不能给出精确的.便于理解的定义.我们要理解的逻 ...
- 听说,99% 的 Go 程序员都被 defer 坑过
原文链接: 听说,99% 的 Go 程序员都被 defer 坑过 先声明:我被坑过. 之前写 Go 专栏时,写过一篇文章:Go 专栏|错误处理:defer,panic 和 recover.有小伙伴留言 ...
- 《手把手教你》系列技巧篇(三十三)-java+ selenium自动化测试-单选和多选按钮操作-上篇(详解教程)
1.简介 在实际自动化测试过程中,我们同样也避免不了会遇到单选和多选的测试,特别是调查问卷或者是答题系统中会经常碰到.因此宏哥在这里直接分享和介绍一下,希望小伙伴或者童鞋们在以后工作中遇到可以有所帮助 ...
- 三分钟极速体验:Java版人脸检测
欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...
- kviy TextInput 触发事件
from kivy.uix.widget import Widget from kivy.app import App from kivy.lang import Builder Builder.lo ...
- PromQL的简单使用
PromQL的简单使用 一.背景 二.PromQL的数据类型 三.字面量 1.字符串字面量 2.浮点数字面量 四.时间序列选择器 1.即时向量选择器 1.组成部分 2.指标名称和匹配器的组合 3.匹配 ...