angularjs - yeoman generator-material-app: not working -
i started estudr yeoman , testing generator equipment-app (https://github.com/michaelkrone/generator-material-app) came across problem. when performing application, umo following error in browser console:
typeerror: cssclasses.split not function @ jqliteaddclass (angular.js:2897) @ function.$get.extend.addclass (angular.js:3538) @ angular-animate.js:119 @ foreach (angular.js:336) @ $$addclass (angular-animate.js:118) @ options (angular-animate.js:132) @ close (angular-animate.js:2328) @ queueanimation (angular-animate.js:2156) @ object.$$animatequeueprovider.$get.push (angular-animate.js:2053) @ object.$animateprovider.$get.leave (angular.js:5224)
i identified angle coming function in cssclasses parameter rather string follows:
cssclasses = (arg1, arg2, arg3) { 2893 if (cssclasses && element.setattribute) { 2894 var existingclasses = (' ' + (element.getattribute('class') || '') + ' ')
i have done: npm install, install bower , gulp build none of helped lot. know can work around this?
it quite simple. there problem jqlite, can install full jquery in front of angularjs.
as angularjs documentation states, if jquery loaded before angularjs script, jquery used instead of jqlite.
since problem in jqlite, if use jquery instead of jqlite, problem goes away.
all need is:
$ bower install --save jquery
and add following line before angular.js script loading:
<script src="./bower_components/jquery/dist/jquery.js"></script>
and problem should goes away.
Comments
Post a Comment