私は角度が新しく、これは初めての経験です。角度1と角度2を同時に使用する
私の最終目標は、私はいくつかのJavaScriptを知っていると私は角2プロジェクトの角度1つのライブラリを使用しようとしてきた、角2 http://mb21.github.io/JSONedit/
で、次のコンポーネントを使用することです。私の検索で
私はこのトピックを発見した: Using Angular 1 libraries in Angular 2?
しかし、回答の状態として「一般的には、ノー」私は角2に1の角の一部のコンポーネントを使用することが可能であると仮定だから私よテストとして、角度2で実行するには、次のコードを作成しようとしています:
翻訳-module.component.html
<select ng-model="selectedName" ng-options="x for x in names">
<option>teste</option>
</select>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.names = ["Emil", "Tobias", "Linus"];
});
</script>
translation-module.com.ts
import { CUSTOM_ELEMENTS_SCHEMA , Component, OnInit, ViewChild } from '@angular/core';
import { angular } from 'angular';
ngAfterViewChecked() {
// $("#content").load("http://www.google.com");
var app = angular.module('myApp', []);
app.controller('myCtrl', function() {
this.names = ["Emil", "Tobias", "Linus"];
});
}
しかし、これは動作していないようです。私はangular1とangular2の両方から.jsをインポートしています。なぜ誰かがこのisntの仕組みを説明できますか?
は