Groups
Groups
Sign in
Groups
Groups
Angular and AngularJS discussion
Conversations
Labels
About
Send feedback
Help
ng:include onload not working
4,083 views
Skip to first unread message
ruedaminute
unread,
Feb 6, 2012, 3:47:45 PM
2/6/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AngularJS
Hi there,
I'm trying like some other threads I've seen here to execute some code
after content from a partial has been loaded. I'm using the following:
<ng:include src="$service('$route').current.template"
scope="$service('$route').current.scope" onload="alert('hello!');"></
ng:include>
However, the alert('hello'); does not run. Any ideas as to why?
Thanks, really liking Angular so far!
Michelle
Vojta Jina
unread,
Feb 6, 2012, 10:42:27 PM
2/6/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
You have to define alert method on your controller...
When the expression is evaluated, it has no access to global context.
V.
ruedaminute
unread,
Feb 7, 2012, 10:33:49 AM
2/7/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AngularJS
Thanks so much, that did the trick :)
Reply all
Reply to author
Forward
0 new messages