How can i conditionally apply title in angular js

Prashobh

How can I conditionally apply title in angular.js

<span title=" Create " class="check-{{ item.status }}"></span>

If status equals to true, then I want to show title as Create else Delete.

For class I can apply conditions like

ng-class="{true: 'active'}[isActive]

and in controller

$scope.isActive = true;

or

$scope.isActive = false;

How can I do the same in title?

I tried something like:

title = " item.status = true | 'create' "
TKrugg

Just do this

<span title="{{ item.status ? 'create' : 'delete'}}" class="check-{{ item.status }}"></span>

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

How can I grab part of MediaWiki page title?

来自分类Dev

How can I watch for an ng-submit event or enter keypress on sub forms in angular.js?

来自分类Dev

Why Can't I Minify Angular.js?

来自分类Dev

How to change page title in Angular using $routeProvider

来自分类Dev

How can I apply a jQuery function to all elements with the same class.?

来自分类Dev

How can I find all text within a word document that matches a pattern and apply formatting on it?

来自分类Dev

How can I match a twitter username with angular ui router

来自分类Dev

How can I wrap every express js request in a domain or trycatch

来自分类Dev

How can i increase load time for bigvideo.js?

来自分类Dev

Angular Js作用域。$ apply不起作用

来自分类Dev

Angular.js:`$ applyAsync`与`$ apply`带套接字

来自分类Dev

How do I conditionally execute a resource in Powershell DSC based on a previous resource executing?

来自分类Dev

How to parseInt in Angular.js

来自分类Dev

How can I minify html, css, js/jquery and ruby code inside Sublime Text 3?

来自分类Dev

How can I install a Node.js module under $HOME/bin

来自分类Dev

How can I make a three.js sprite face towards a specific vector?

来自分类Dev

How do I apply decorators to a superclass's methods?

来自分类Dev

Angular JS $ scope。$ apply给出插值错误“ TypeError:将圆形结构转换为JSON”

来自分类Dev

Angular.js-即使$ digest()已经在使用中,也必须使用$ apply()-为什么?

来自分类Dev

Angular JS $ scope。$ apply给出插值错误“ TypeError:将圆形结构转换为JSON”

来自分类Dev

我们可以在 Angular js 中不使用 $apply 触发 $digest 吗?

来自分类Dev

How can I cancel an ngEvent?

来自分类Dev

How can I return a function?

来自分类Dev

How can I create a web application using Angular frontend and Node backend and Git hub API starting from OAuth?

来自分类Dev

How can I make a field in a meteor Simple Schema equal to a js variable and still let the user fill out the rest of the simple schema?

来自分类Dev

How to create Dynamic factory in Angular js?

来自分类Dev

How do I modularize polyfills in Angular?

来自分类Dev

How do I count selected checkboxes in Angular?

来自分类Dev

如何调用JS .apply()方法

Related 相关文章

  1. 1

    How can I grab part of MediaWiki page title?

  2. 2

    How can I watch for an ng-submit event or enter keypress on sub forms in angular.js?

  3. 3

    Why Can't I Minify Angular.js?

  4. 4

    How to change page title in Angular using $routeProvider

  5. 5

    How can I apply a jQuery function to all elements with the same class.?

  6. 6

    How can I find all text within a word document that matches a pattern and apply formatting on it?

  7. 7

    How can I match a twitter username with angular ui router

  8. 8

    How can I wrap every express js request in a domain or trycatch

  9. 9

    How can i increase load time for bigvideo.js?

  10. 10

    Angular Js作用域。$ apply不起作用

  11. 11

    Angular.js:`$ applyAsync`与`$ apply`带套接字

  12. 12

    How do I conditionally execute a resource in Powershell DSC based on a previous resource executing?

  13. 13

    How to parseInt in Angular.js

  14. 14

    How can I minify html, css, js/jquery and ruby code inside Sublime Text 3?

  15. 15

    How can I install a Node.js module under $HOME/bin

  16. 16

    How can I make a three.js sprite face towards a specific vector?

  17. 17

    How do I apply decorators to a superclass's methods?

  18. 18

    Angular JS $ scope。$ apply给出插值错误“ TypeError:将圆形结构转换为JSON”

  19. 19

    Angular.js-即使$ digest()已经在使用中,也必须使用$ apply()-为什么?

  20. 20

    Angular JS $ scope。$ apply给出插值错误“ TypeError:将圆形结构转换为JSON”

  21. 21

    我们可以在 Angular js 中不使用 $apply 触发 $digest 吗?

  22. 22

    How can I cancel an ngEvent?

  23. 23

    How can I return a function?

  24. 24

    How can I create a web application using Angular frontend and Node backend and Git hub API starting from OAuth?

  25. 25

    How can I make a field in a meteor Simple Schema equal to a js variable and still let the user fill out the rest of the simple schema?

  26. 26

    How to create Dynamic factory in Angular js?

  27. 27

    How do I modularize polyfills in Angular?

  28. 28

    How do I count selected checkboxes in Angular?

  29. 29

    如何调用JS .apply()方法

热门标签

归档