mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-25 06:13:44 +00:00
parent
1691c4e9a3
commit
333e3375e0
1 changed files with 3 additions and 3 deletions
|
|
@ -682,10 +682,10 @@ Following is an example of building a reusable widget.
|
||||||
'</div>',
|
'</div>',
|
||||||
// The linking function will add behavior to the template
|
// The linking function will add behavior to the template
|
||||||
link: function(scope, element, attrs) {
|
link: function(scope, element, attrs) {
|
||||||
// Title element
|
// Title element
|
||||||
var title = angular.element(element.children()[0]),
|
var title = angular.element(element.children()[0]),
|
||||||
// Opened / closed state
|
// Opened / closed state
|
||||||
opened = true;
|
opened = true;
|
||||||
|
|
||||||
// Clicking on title should open/close the zippy
|
// Clicking on title should open/close the zippy
|
||||||
title.on('click', toggle);
|
title.on('click', toggle);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue