1

I am working on a mean stack application using angular material design. I got stuck on using 'md-datepicker'. I was designing a form which is having an Date of birth field but md-datepicker dont allow to select the year. I found a bower packer "https://github.com/alenaksu/mdPickers" and I was trying to add it into my project.

  1. I installed the bower

    npm install bower

  2. Install package,

    bower install mdpackages

after this steps I got the bower-components in my project directory. So my question is where should i link this components. (I am really new in the mean stack). Now I dont know how to use it in my project. image of the Dir of mdpicker-bower package

I know the question is little bit confusing, but if some one can help me i am will open to teamviwer. Thanks in advance.

jatinder bhola
  • 385
  • 1
  • 7
  • 23
  • you reference apropriate scripts/style in you index.html file, for example: http://stackoverflow.com/questions/13739568/how-do-i-link-a-javascript-file-to-a-html-file or http://foundation.zurb.com/forum/posts/448-how-do-you--use-bower_components – vidriduch May 25 '16 at 15:51

1 Answers1

2

Where you instantiate your root application module, append mdPickers as a dependency. Such as,

angular.module("app", [
    "mdPickers"
  ]); 

In your controller, you then instantiate the component you want to use.

angular.module("app").controller("MainCtrl", ['$scope', '$mdpDatePicker', function($scope, $mdpDatePicker) {
  // do something with $mdpDatePicker
}]);

You can find more complete examples of how to use the module here.

DankestMemes
  • 143
  • 3
  • 10