darul75 / angular-awesome-slider

:arrows_clockwise: Angular slider control directive
http://darul75.github.io/angular-awesome-slider/
MIT License
144 stars 63 forks source link

problem with minified version #14

Closed vorko closed 10 years ago

vorko commented 10 years ago

bower automatically use bower_components/ng-slider/dist/ng-slider.min.js and i got this error :

Error: e.$viewValue.split is not a function
.link/e.$render@http://0.0.0.0:9000/bower_components/ng-slider/dist/ng-slider.min.js:6
ngModelWatch@http://0.0.0.0:9000/bower_components/angular/angular.js:16717
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://0.0.0.0:9000/bower_components/angular/angular.js:11753
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://0.0.0.0:9000/bower_components/angular/angular.js:12012
done@http://0.0.0.0:9000/bower_components/angular/angular.js:7818
completeRequest@http://0.0.0.0:9000/bower_components/angular/angular.js:7991
createHttpBackend/</xhr.onreadystatechange@http://0.0.0.0:9000/bower_components/angular/angular.js:7950

http://0.0.0.0:9000/bower_components/angular/angular.js
Line 9383

with bower_components/ng-slider/src/ng-slider.js , there's no problem...

am i making something wrong ?

vorko commented 10 years ago
darul75 commented 10 years ago

hi, i check tonight

vorko commented 10 years ago

it's working for the minified js. Thanks a lot.

( there is always the problem with yeoman / bower => after a bower update and a grunt serve, .css is deleted on the index.html )

darul75 commented 10 years ago

hello vorko, I have installed last version with bower just now but I can not figured out what problem you get.

index.html is just an example file, you do not need it for your own app.

give me some details, I will try helping you to fix problem.

vorko commented 10 years ago

i use yeoman ( http://yeoman.io/) for my angularjs project. there is an index.html main page . when i install a package ( like ng-select ), i do a bower install ng-slider --save. and when i do grunt serve , the new component is added automatically in my index.html in a special part for css and for js like this

 <!-- build:css styles/vendor.css -->
    <!-- bower:css -->
    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
    <link rel="stylesheet" href="bower_components/ng-table/ng-table.css" />
    <link rel="stylesheet" href="bower_components/angular-dialog-service/dialogs.css" />
    <link rel="stylesheet" href="bower_components/select2/select2.css" />
    <link rel="stylesheet" href="bower_components/bootstrap-switch/build/css/bootstrap3/bootstrap-switch.css" />
    <link rel="stylesheet" href="bower_components/selectize/dist/css/selectize.css" />

    <!-- endbower -->

and for all the other component, .css and .js are added, but with ng-slider, there is only the minified js, not the .css.

actually i got a workaround : i put it in the manual part because if i put it the bower part, every grunt serve shoot it...

i think it's a problem in the package or bower file. ( in other extension, there is the .css and the .js on the files ) like that

{
  "name": "bootstrap-switch",
  "description": "Unofficial bootstrap switch",
  "version": "1.9.0",
  "main": [
    "build/js/bootstrap-switch.js",
    "build/css/bootstrap3/bootstrap-switch.css"
  ],
  "ignore": [
    "docs"
  ],
  "dependencies": {
    "jquery": ">=1.9.0"
  }
}

i try to add .css like that but it does nothing. maybe the ng-slider gruntfile is not compatible.

darul75 commented 10 years ago

I see you are right I gonna change something in bower.json. Thanks for all details

darul75 commented 10 years ago

hi @vorko normally fixed, I do not know about bower cache, let me know.

darul75 commented 10 years ago

@vorko, any feedback ? ;)

vorko commented 10 years ago

sorry, i forgot to test... i just try and it doesn't work. now there no .css or .js added by grunt serve.

darul75 commented 10 years ago

even with '0.1.4' version ?

darul75 commented 10 years ago

or looks like bower do not want any minified files, I have to change something again, I will try

vorko commented 10 years ago

yes i got the last version. with previous version, .js was here but not the .css.

maybe it's the grunt script of yeoman.

darul75 commented 10 years ago

that is weird and if no js now...not good. I have just launched a 'bower install ng-slider' in a temp folder and get the correct directories. Then I do not know with yeoman as I have just use it a little. I have also checked some other packages, and bower main array resources ( minified or not ) seems to be a common way...

vorko commented 10 years ago
npm install -g yo
npm install -g generator-angular
yo angular 

with that you got an empty angularjs app.

grunt serve to launch the first build. stop it

after that do bower install ng-slider --save

and launch grunt serve again, it should add .css and .js in the index.html page of the app.

maybe you can try to use another component to see how it's working

darul75 commented 10 years ago

oh so nice I check it soon

darul75 commented 10 years ago

oops sorry until now I forget to come back to this issue