mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-21 10:05:34 +08:00
committed by
Pete Bacon Darwin
parent
1691c4e9a3
commit
333e3375e0
@@ -682,10 +682,10 @@ Following is an example of building a reusable widget.
|
||||
'</div>',
|
||||
// The linking function will add behavior to the template
|
||||
link: function(scope, element, attrs) {
|
||||
// Title element
|
||||
// Title element
|
||||
var title = angular.element(element.children()[0]),
|
||||
// Opened / closed state
|
||||
opened = true;
|
||||
// Opened / closed state
|
||||
opened = true;
|
||||
|
||||
// Clicking on title should open/close the zippy
|
||||
title.on('click', toggle);
|
||||
|
||||
Reference in New Issue
Block a user