Skip to content

Commit c346a28

Browse files
fix($viewContentLoading): Add $viewContentLoading event back
Closes ui-router/ui-router.github.io#9
1 parent 3d54041 commit c346a28

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/directives/viewDirective.ts

+14
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,20 @@ function $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $
285285
$$animLeave: animLeave
286286
};
287287

288+
/**
289+
* @ngdoc event
290+
* @name ui.router.state.directive:ui-view#$viewContentLoading
291+
* @eventOf ui.router.state.directive:ui-view
292+
* @eventType emits on ui-view directive scope
293+
* @description
294+
*
295+
* Fired once the view **begins loading**, *before* the DOM is rendered.
296+
*
297+
* @param {Object} event Event object.
298+
* @param {string} viewName Name of the view.
299+
*/
300+
newScope.$emit('$viewContentLoading', name);
301+
288302
let cloned = $transclude(newScope, function(clone) {
289303
clone.data('$uiViewAnim', $uiViewAnim);
290304
clone.data('$uiView', $uiViewData);

0 commit comments

Comments
 (0)