0

I am trying to use angular-kendo in a Dart application. Any ideas on how to make this happen? Currently when in include angular-kendo.js in the html file i get

'Breaking on exception: ReferenceError: angular is not defined'

Here is my html file:

<html ng-app>

<head>
    <meta charset="utf-8">
    <title>Business portal app</title>

    <link rel="stylesheet" href="../lib/kendo/styles/kendo.common.min.css">
    <link rel="stylesheet" href="../lib/kendo/styles/kendo.default.min.css">
    <link rel="stylesheet" href="../lib/bootstrap/bootstrap.min.css">
</head>


<body>

<select kendo-drop-down-list>
  <option value="1">Thing 1</option>
  <option value="2">Thing 2</option>
  <option value="3">Thing 3</option>
</select>
<!-------------------  Javascript Includes ---------------------->
        <script src="../lib/jquery.min.js"></script>
        <!-- <script src="../lib/bootstrap/js/bootstrap.min.js"></script> -->
        <script src="../lib/kendo/kendo.all.min.js"></script>
        <script src="../lib/angular-kendo/angular-kendo.js"></script>
        <script type="application/dart" src="business_portal_app.dart"></script>
        <script src="packages/browser/dart.js"></script>
        <!-- <script src="packages/browser/interop.js"></script> -->

    </body>
</html>

and here is the dart file:

import 'dart:html';
import 'package:angular/angular.dart';

class MyAppModule extends Module {
    BusinessPortalModule() {

    }
}

void main() {
    ngBootstrap(module: new MyAppModule());
}

Thanks.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
bardiak
  • 31
  • 1
  • 4
  • angular-kendo directives/components are written in JavaScript and won't work with AngularDart. You have to add the AngularJS dependency - see @ChristoperMarshall s anwer. AFAIK AngularJS and AngularDart won't work simultaneously on the same page. angular-kendo directives need to be ported to AngularDart to work without AngularJS. – Günter Zöchbauer Feb 10 '14 at 10:59

1 Answers1

0

You're missing the angular dependency

From the Docs

To use Angular-Kendo, you need to include the angular-kendo.js file in your page BELOW Angular and Kendo UI. Don't forget that Kendo UI depends on jQuery, so you are going to need that too:

<script src="js/angular-1.0.5.min.js"></script>

Also make sure your app name is defined.

E.g

<html ng-app="myAppName">
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
Christopher Marshall
  • 10,678
  • 10
  • 55
  • 94