jatinder bhola jatinder bhola - 4 months ago 28x
AngularJS Question

How to use a bower package component into my project

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.


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

angular.module("app", [

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.