Emberにangle-filemanagerアドオンを使用しようとしていて、まったく成功していません。私はEmberの中で角度指示をどのように走らせるのかを言うstackoverflowに関するこの他の質問を見つけましたが、それはあまり役に立ちませんでした。Ember Angularディレクティブを実行する方法とAngularをインポートする方法
Run an angular directive inside other javascript framework template
import Component from 'ember-component';
import angular from 'angular';
export default Component.extend({
didInsertElement: function() {
debugger;
let model = this.get('model');
angular.module('myapp', []).directive('somedirective', function() {
return { template: 'test {{ model[0] }} test' };
}).run(function($rootScope){ $rootScope.model = model; });
angular.bootstrap(this.element, ['myapp']);
}
});
私はbower install --save angular
との角度に設置し、上記のコードのように、それをインポートしようとしたが、それは動作しません。 ember-cli-build.js
などのファイルからインポートする必要がありますか?
さらに、このコードが何を行っているか教えてください。私はコンポーネントが使用されるときにそのテンプレートを返す角度モジュールを作成していると思います。コンポーネントを呼び出すだけで、コンポーネントのテンプレートなしで動作しますか? {{component-name model=model}}
のように?
私はhttps://github.com/miguelcobain/ember-paperを見る必要があると思います。 –