angularjs – 让Angular Bootstrap手风琴发挥作用
发布时间:2020-12-17 10:25:53 所属栏目:安全 来源:网络整理
导读:我没有运气让手风琴在这个回购中工作: https://github.com/angular-ui/bootstrap 似乎标题没有出现,我不知道为什么. HTML: !doctype htmlhtml ng-app="myApp"head meta http-equiv="content-type" content="text/html; charset=UTF-8" titleAngular UI Tes
我没有运气让手风琴在这个回购中工作:
https://github.com/angular-ui/bootstrap
似乎标题没有出现,我不知道为什么. HTML: <!doctype html> <html ng-app="myApp"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Angular UI Test</title> <meta charset="utf-8" /> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script> <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap-combined.min.css" /> <script src="https://raw.github.com/angular-ui/bootstrap/master/src/accordion/accordion.js"></script> <script src="app.js"></script> <style type="text/css"> .wrap {width:960px;margin:0 auto;} </style> </head> <body> <div class="wrap" ng-controller="MyCtrl"> <accordion> <accordion-group title="Title">This has a one word title.</accordion-group> <accordion-group title="Title2">This also has a one word title.</accordion-group> <accordion-group title="Title With Spaces">This has a title with spaces!</accordion-group> </accordion> </div> </body> JS: var myApp = angular.module('myApp',['ui.bootstrap.accordion']); function MyCtrl($scope) { }
你需要把”包起来
以下是3种不同的设置方法 <accordion> <accordion-group title="title">This has a one word title.</accordion-group> <accordion-group title="Title2='Title 2' ">This also has a one word title.</accordion-group> <accordion-group title=" 'Title 3' ">This has a title with spaces!</accordion-group> </accordion> 这是工作plunker (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |