【angularjs如何打开页面跳转】AngularJS如何打开页面隐藏显示表达式的教程

时间:2020-12-17  来源:js教程  阅读:

本文实例讲述了AngularJS打开页面隐藏显示表达式用法。分享给大家供大家参考,具体如下:

1.使用 ng-cloak, 同时要在css加入一行 [ng-cloak] {display: none;} 样式 [ng:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }

2.使用ng-bind, 代替{{}} 这个不太方便,因为使用ng-bind后必须要一个DOM节点绑定, 例如span上, 没有直接{{}} 用不需要DOM节点方便

3.使用ng-model

<% include common/header.html %>

  

  

  

    

      

ABOUT

      

        

        

        

{{clumnData.email.title}}:768065158@qq.com

        

{{item.title}}:

      

      

        

        

          

        

        

          

          

            ctrl + enter 发送评论,字数:0/300

          

        

      

      {{name}}

    

    

      

        

欢迎来到pfan空间

        

这里有更多的知识分享,交流。

        

<%= content %>

        

<%= date %>

      

    

  

  111111

  

<% include common/Jsfoot.html %>

<script>

angular.element(document.getElementById("next")).bind('click',function() {

    alert(this.innerHTML);

  });

  varapp = angular.module("myApp",[],function(){console.log('strat')});

  varclumnData = {

    title:"关于我",

    detail:"小前端一枚,喜欢javascript、喜欢nodejs、喜欢canvas",

    email:{title:"邮箱",link:"768065158@qq.com"},

    list:[{title:"github",link:"https://github.com/pingfanren/"},

      {title:"一聚教程网",link:"http://www.111cn.net/"},

      {title:"技术分享平台",link:"http://pingfan1990.sinaapp.com/"},

      {title:"前端导航平台",link:"http://doc.pfan123.com/"},

    ]

  };

   app.controller("aboutus",function($scope){

     $scope.clumnData = clumnData;

   });

   app.controller("comment",function($scope){

     $scope.title ="给我留言";

     $scope.comment=function(){

    }

   });

</script>

<% include common/footer.html %>

【angularjs如何打开页面跳转】AngularJS如何打开页面隐藏显示表达式的教程

http://m.bbyears.com/wangyezhizuo/116923.html

推荐访问:
相关阅读 猜你喜欢
本类排行 本类最新