NG6-starter icon indicating copy to clipboard operation
NG6-starter copied to clipboard

Can`t appen kendo-ui-core to project

Open casufi opened this issue 9 years ago • 3 comments

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 avatar Sep 15 '16 10:09 casufi

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);

casufi avatar Sep 15 '16 10:09 casufi

try something like this,

import $ from 'jquery';
import jQuery from 'jquery';

samithaf avatar Sep 21 '16 11:09 samithaf

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

casufi avatar Sep 21 '16 11:09 casufi