我們有一個應用程序構建與需要js,jquery。現在我們想將角度2添加到應用程序中的其中一個屏幕上。我嘗試了幾個使用angular2的例子,它的功能非常好,工作正常。角2與實用js有要求js
現在我打算將它與我們的應用程序集成在一起。因此,按照下面的鏈接,我發現我們必須使用angular2 system.js而不是require.js https://github.com/angular/angular/issues/5412
但在這種情況下,我有一些實用JS其中,因爲它在不同的屏幕中使用我不能改變。該實用程序的JS在這種情況下,我將如何添加依賴我的新角2組件需要語法
define(['jquery','misc','utils','common','screenUtils'],
function(jQuery, misc,utils,common,screenUtils) {
//Public function goes here.
return publicFunctions;
}
);
請指點。我是angular2的新手,不知道如何用require來注入工具js。
import {Component} from '@angular/core';
@Component({
selector: 'animate-app',
templateUrl: 'ts-src/animate.tpl.html',
host: {'class' : 'ng-animate page2Container'}
})
export class AnimateComponent{
}
請指教。