Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
d1dd7e35
Commit
d1dd7e35
authored
Apr 08, 2015
by
Sam Saccone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typescript-angular: Fix directive memory leak
parent
ee1887e2
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
examples/typescript-angular/js/Application.js
examples/typescript-angular/js/Application.js
+1
-0
examples/typescript-angular/js/Application.js.map
examples/typescript-angular/js/Application.js.map
+1
-1
examples/typescript-angular/js/directives/TodoBlur.ts
examples/typescript-angular/js/directives/TodoBlur.ts
+2
-1
No files found.
examples/typescript-angular/js/Application.js
View file @
d1dd7e35
...
...
@@ -45,6 +45,7 @@ var todos;
return
{
link
:
function
(
$scope
,
element
,
attributes
)
{
element
.
bind
(
'
blur
'
,
function
()
{
$scope
.
$apply
(
attributes
.
todoBlur
);
});
$scope
.
$on
(
'
$destroy
'
,
function
()
{
element
.
unbind
(
'
blur
'
);
});
}
};
}
...
...
examples/typescript-angular/js/Application.js.map
View file @
d1dd7e35
This diff is collapsed.
Click to expand it.
examples/typescript-angular/js/directives/TodoBlur.ts
View file @
d1dd7e35
...
...
@@ -10,7 +10,8 @@ module todos {
return
{
link
:
(
$scope
:
ng
.
IScope
,
element
:
JQuery
,
attributes
:
any
)
=>
{
element
.
bind
(
'
blur
'
,
()
=>
{
$scope
.
$apply
(
attributes
.
todoBlur
);
});
$scope
.
$on
(
'
$destroy
'
,
()
=>
{
element
.
unbind
(
'
blur
'
);
});
}
};
}
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment