mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-31 13:30:29 +00:00
style(docs): improve the formatting of events in docs
This commit is contained in:
parent
ad3cc16eef
commit
3c80cf3df6
3 changed files with 16 additions and 8 deletions
|
|
@ -221,7 +221,7 @@ Doc.prototype = {
|
|||
} else if(atName == 'eventType') {
|
||||
var match = text.match(/^([^\s]*)\s+on\s+([\S\s]*)/);
|
||||
self.type = match[1];
|
||||
self.source = match[2];
|
||||
self.target = match[2];
|
||||
} else {
|
||||
self[atName] = text;
|
||||
}
|
||||
|
|
@ -531,11 +531,14 @@ Doc.prototype = {
|
|||
});
|
||||
});
|
||||
dom.h('Events', this.events, function(event){
|
||||
var signature = (event.param || []).map(property('name'));
|
||||
dom.h(event.type + ' ' +
|
||||
event.shortName + '(' + signature.join(', ') + ') on ' +
|
||||
event.source, event, function(){
|
||||
dom.h(event.shortName, event, function(){
|
||||
dom.html(event.description);
|
||||
dom.tag('div', {class:'inline'}, function(){
|
||||
dom.h('Type:', event.type);
|
||||
});
|
||||
dom.tag('div', {class:'inline'}, function(){
|
||||
dom.h('Target:', event.target);
|
||||
});
|
||||
event.html_usage_parameters(dom);
|
||||
self.html_usage_this(dom);
|
||||
|
||||
|
|
|
|||
|
|
@ -420,3 +420,8 @@ li {
|
|||
[ng\:cloak], .ng-cloak {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.inline * {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ angularServiceInject('$route', function($location, $routeParams) {
|
|||
* @ngdoc event
|
||||
* @name angular.service.$route#$beforeRouteChange
|
||||
* @eventOf angular.service.$route
|
||||
* @eventType Broadcast on root scope
|
||||
* @eventType broadcast on root scope
|
||||
* @description
|
||||
* Broadcasted before a route change.
|
||||
*
|
||||
|
|
@ -89,7 +89,7 @@ angularServiceInject('$route', function($location, $routeParams) {
|
|||
* @ngdoc event
|
||||
* @name angular.service.$route#$afterRouteChange
|
||||
* @eventOf angular.service.$route
|
||||
* @eventType Broadcast on root scope
|
||||
* @eventType broadcast on root scope
|
||||
* @description
|
||||
* Broadcasted after a route change.
|
||||
*
|
||||
|
|
@ -108,7 +108,7 @@ angularServiceInject('$route', function($location, $routeParams) {
|
|||
* @ngdoc event
|
||||
* @name angular.service.$route#$routeUpdate
|
||||
* @eventOf angular.service.$route
|
||||
* @eventType Emit on the current route scope.
|
||||
* @eventType emit on the current route scope
|
||||
* @description
|
||||
*
|
||||
* The `reloadOnSearch` property has been set to false, and we are reusing the same
|
||||
|
|
|
|||
Loading…
Reference in a new issue