2012-11-03 52 views
5

我有沒有運氣得到手風琴從該回購工作: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) { 
} 

回答

4

你需要把'包裹標題

這裏有3種不同的方法t將其

<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

+0

多麼愚蠢的我。謝謝! – kmm

+0

它發生在我身上很多次:)。你不是一個人。 – maxisam