PatrickJS / NG6-starter

:ng: An AngularJS Starter repo for AngularJS + ES6 + Webpack
https://angularclass.github.io/NG6-starter
Apache License 2.0
1.91k stars 1.35k forks source link

Can`t appen kendo-ui-core to project #174

Open casufi opened 8 years ago

casufi commented 8 years ago

I added kendo-ui-core to project using npm install kendo-ui-core --save-dev than I imported it in app.js

import $ from 'jquery';
import angular from 'angular';
import 'kendo-ui-core';

Now I get the follwing error Error: The Kendo UI directives require jQuery to be available before AngularJS. Please include jquery before angular in the document.

Please advise how to import jquery in correct way.

casufi commented 8 years ago

Here is the whole app.js

import $ from 'jquery';
import angular from 'angular';
import 'kendo-ui-core';
import uiRouter from 'angular-ui-router';
import ngResource from 'angular-resource';
import ngCookies from 'angular-cookies';
import Common from './common/common';
import Components from './components/components';
import AppComponent from './app.component';
import 'normalize.css';

angular.module('app', [
    'kendo.directives',
    uiRouter,
    ngResource,
    ngCookies,
    Common,
    Components
  ])
  .config(($locationProvider, $httpProvider) => {
    "ngInject";
    // @see: https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions
    // #how-to-configure-your-server-to-work-with-html5mode
    $locationProvider.html5Mode(true).hashPrefix('!');
    $httpProvider.interceptors.push('InterceptorService');

  })

  .component('app', AppComponent);
samithaf commented 8 years ago

try something like this,

import $ from 'jquery';
import jQuery from 'jquery';
casufi commented 8 years ago

Here is the solution https://github.com/telerik/kendo-ui-core/issues/1932