MCPcopy Create free account
hub / github.com/apache/cloudstack / update

Function update

tools/ngui/static/js/lib/angular.js:14183–14211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14181 }
14182
14183 function update() {
14184 var locals = $route.current && $route.current.locals,
14185 template = locals && locals.$template;
14186
14187 if (template) {
14188 element.html(template);
14189 destroyLastScope();
14190
14191 var link = $compile(element.contents()),
14192 current = $route.current,
14193 controller;
14194
14195 lastScope = current.scope = scope.$new();
14196 if (current.controller) {
14197 locals.$scope = lastScope;
14198 controller = $controller(current.controller, locals);
14199 element.children().data('$ngControllerController', controller);
14200 }
14201
14202 link(lastScope);
14203 lastScope.$emit('$viewContentLoaded');
14204 lastScope.$eval(onloadExp);
14205
14206 // $anchorScroll might listen on event...
14207 $anchorScroll();
14208 } else {
14209 clearContent();
14210 }
14211 }
14212 }
14213 };
14214}];

Callers 1

angular.jsFile · 0.85

Calls 4

destroyLastScopeFunction · 0.85
linkFunction · 0.85
clearContentFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected