Grunt build causing Angular app to crash on dist
So I went down the wrong path thinking smoothing was wrong with Uglify or concat or minification.
The error did not occur with grunt serve
but did occur only after a dist package was created with grunt build:dist
So it was deceiving in a sense that my Angular app DID work fine until I created a dist package.
The issue was for me, that I originally had a <ng-include src="'scripts/navigation/navigationMobile.html'"></ng-include>
element in my Index.html file.
At some point I created a custom element directive <my-nav></my-nav>
which used the same templateUrl = scripts/navigation/navigationMobile.html
but I forgot to remove the <ng-include src="'scripts/navigation/navigationMobile.html'"></ng-include>
element from my Index.html that <my-nav></my-nav>
was intended to replace.
For whatever reason the 10 $digest() iterations reached. Aborting! only occurred after running grunt build
and creating the minified, Uglified vendor.js file, it did not occur when just developing and testing using grunt serve
but I do not know the exact reason that the error only presented itself after grunt build
.
Maybe someone can answer that.