title: TypeError: element.summernote is not a function
body: <p>I'm working on project based on Angular, Webpack, etc. And I've faced to very interesting issue when I wanted to use <a href="https://github.com/summernote/angular-summernote" rel="nofollow noreferrer">angular-summernote</a></p>
  
  <p>It doesn't work, and gives me an error "TypeError: element.summernote is not a function". It works normally if adding libraries as script tags, without any build tool, but with Webpack it doesn't.</p>
  
  <p>So, let's look at files and configs</p>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>let webpack = require('webpack');
  let path = require('path');
  
  module.exports = {
  
      entry: {
          bundle: [
              './app/app.js'
          ]
      },
      output: {
          path: path.join(__dirname, './public'),
          filename: '[name].js',
      },
      resolve: {
          root: __dirname,
          extensions: ['', '.js'],
          modulesDirectories: [
              'node_modules',
              'app'
          ],
      },
      externals: {
  
      },
      plugins: [
          new webpack.ProvidePlugin({
              $: 'jquery',
              jQuery: 'jquery'
          })
      ],
      module: {
          loaders: [
              {
                  loader: 'babel-loader',
                  query: {
                      presets: ['es2015']
                  },
                  test: /\.js$/,
                  exclude: /(node_modules|bower_components)/
              }
          ]
      }
  
  };
  </code></pre>
  
  <p><strong>app/app.js</strong></p>
  
  <pre><code>// Load libs
  import angular from 'angular';
  import ngRoute from 'angular-route';
  import summernote from 'summernote';
  import ngSummernote from 'angular-summernote/dist/angular-summernote.js';
  
  // App
  angular.module('app', [ngRoute, 'summernote'])
  
  .config(function($routeProvider) {
  
      // Router
      $routeProvider
  
          .when('/', {
              template: '&lt;summernote&gt;&lt;/summernote&gt;'
          });
  });
  </code></pre>
  
  <p>I've found <a href="https://github.com/summernote/angular-summernote/issues/158" rel="nofollow noreferrer">github issue</a>, but it still has Open status.</p>
  
  <p>I made some debug, checked "link" method of "summernote" directive, and logged "element" to console, it's proto object doesn't contain any jquery methods including "summernote" method. <strong>Why? And how to make it work?</strong></p>