SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 0 JavaScript

fix(ngRoute): instantiate controller when template is empty

Before this change, $route controllers are not instantiated if the template is falsy, which includes
the empty string. This change tests if the template is not undefined, rather than just falsy, in
order to ensure that templates are instantiated even when the template is empty, which people may
have some reason to do.

This "bug" was reported in http://robb.weblaws.org/2013/06/21/angularjs-vs-emberjs/, as a "gotcha"
for AngularJS / ngRoute.

Closes #5550
C
Caitlin Potter committed
498365f219f65d6c29bdf2f03610a4d3646009bb
Parent: 056c849
Committed by Igor Minar <igor@angularjs.org> on 12/28/2013, 6:45:46 AM