خرید بک لینک

Vote count: 0

I am trying to use joint.js with Angular 2. Here is what I did.

index.html

<!-- JoinJS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jointjs/0.9.7/joint.css" />
<script src="https://code.jquery.com/jquery-2.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.3.1/backbone-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jointjs/0.9.7/joint.js"></script>  

config.js

  var  map = {
    'app':                        'app', // 'dist',
    'rxjs':                       'https://npmcdn.com/rxjs@5.0.0-beta.6',
    'angular2-in-memory-web-api': 'https://npmcdn.com/angular2-in-memory-web-api', // get latest
    'joint':                      'https://cdnjs.cloudflare.com/ajax/libs/jointjs/0.9.7/joint.js'
  };

  //packages tells the System loader how to load when no filename and/or no extension
  var packages = {
    'app':                        { main: 'main.ts',  defaultExtension: 'ts' },
    'rxjs':                       { defaultExtension: 'js' },
    'angular2-in-memory-web-api': { defaultExtension: 'js' },
    'joint': { defaultExtension: 'js' },
  };

service.ts

//declare var joint: any;
import * as joint from 'joint';

I got error "[ts] Could not find module joint".

What's missing here?

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 6 خرداد 1395 ساعت: 12:43

صفحه بندی