googlearchive / generator-angularfire

Yeoman generator for AngularFire: Angular + Firebase apps
191 stars 52 forks source link

Fixed undefined var when generating without Bootstrap #16

Closed nizhu closed 9 years ago

nizhu commented 9 years ago

Bombs out when it attempts to evaluate btnDanger for line 42

undefined:38
((__t = ( btnDanger )) == null ? '' : __t) +
          ^
ReferenceError: btnDanger is not defined
    at eval (eval at template (/usr/local/lib/node_modules/generator-angularfire/node_modules/yeoman-generator/node_modules/lodash/dist/lodash.js:6305:22), <anonymous>:38:11)
    at Generator.underscore [as _engine] (/usr/local/lib/node_modules/generator-angularfire/node_modules/yeoman-generator/lib/util/engines.js:32:30)
    at Generator.engine (/usr/local/lib/node_modules/generator-angularfire/node_modules/yeoman-generator/lib/actions/actions.js:303:10)
    at Generator.template (/usr/local/lib/node_modules/generator-angularfire/node_modules/yeoman-generator/lib/actions/actions.js:281:15)
    at Generator._htmlTpl (/usr/local/lib/node_modules/generator-angularfire/app/index.js:490:8)
    at Generator.copyAngularFireFiles (/usr/local/lib/node_modules/generator-angularfire/app/index.js:418:10)
    at /usr/local/lib/node_modules/generator-angularfire/node_modules/yeoman-generator/lib/base.js:341:43
    at /usr/local/lib/node_modules/generator-angularfire/node_mo%

Was going to write a test for this, but I don't see a test task on Grunt. How can I run them?

katowulf commented 9 years ago

Thanks for the fix!

Re: tests - strange; it's not in generator-angular either, and nobody has filed a bug. Looks like npm test does the trick.

somecallmejosh commented 9 years ago

Hi there, just a heads up: I just updated this generator and am still getting the same error if I include bootstrap.

katowulf commented 9 years ago

I haven't created a new release yet.