如何隐藏的{{title}}上述<标题>在使用AngularJS标签? [英] How to hide {{title}} in <title> tag while using AngularJS?

查看:101
本文介绍了如何隐藏的{{title}}上述<标题>在使用AngularJS标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要动态更新<标题>在此基础上的路由/页用户查看我的网页。问题是,当页面加载时,几秒钟它显示的{{title}}里面我<标题> 标记它后来在当前页面的标题所说(从控制器加载)。没有办法,我可以有{{title}}的默认隐藏,直到值加载?

I want to dynamically update the <title> of my page based on which route / page a user is viewing. Problem is, when the page loads, for a few seconds it shows {{title}} inside my <title> tag where it later puts in the title of the current page (loaded from the controller). Any way I could have the {{title}} hidden by default until the value is loaded?

推荐答案

使用 ngBind &LT;标题&GT; 元素:

<title ng-bind="title"> Default title </title>

这篇关于如何隐藏的{{title}}上述&lt;标题&GT;在使用AngularJS标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆