我是Angular.js的新手,我需要在我的应用程序之间进行指令之间的一些通信,我阅读了一些关于链接和需求的文档,但是无法准确理解它是如何工作的.
我有一个简单的例子:活小提琴:http://jsfiddle.net/yw235n98/5/
HTML:
<body ng-app="myApp">
First Directive :
<first-dir >
<h3>{{firstCtrl.data}}</h3>
<button ng-click="firstCtrl.set('NEW VALUE')">Change Value</button>
</first-dir>
Second Directive :
<second-dir>
<h3>{{secondCtrl.data}}</h3>
</second-dir>
Run Code Online (Sandbox Code Playgroud)
Javascript:
(function(){
var app = angular.module('myApp', []);
app.directive("firstDir", function(){
return {
restrict : 'E',
controller : function(){
this.data = 'init value';
this.set = function(value){
this.data = value;
// communication with second Directive ???
}
},
controllerAs : 'firstCtrl'
};
});
app.directive("secondDir", function(){
return {
restrict : 'E',
controller : function(){
this.data …Run Code Online (Sandbox Code Playgroud) 如何在plunker中创建目录?或者如果有目录如何在该目录中创建新文件/移动?
你需要使用外部工具吗?
Ex :我已经编辑了这个现有的angular2 plunker,我创建了myFile.ts文件,我想在app文件夹中移动它.
http://plnkr.co/edit/ZfeAwx8ye3xRWjAUSIyn?p=options
我正在使用angular2 QUICKSTART,我有一个问题,即Visual Studio无法识别带有打字稿导入模块的Angular2,在休息时一切都很好:
它说:
找不到模块'angular2/platform/browser'
我的应用:
我知道打字稿应该直接从node_modules - > angular2读取.d.ts文件,但无论如何我试图添加angular2 DefinitelyTyped但仍然无效.
Atm我使用VS 2013更新5安装了typescript 1.5(我也试过1.75)
我有一个 firebase 域,如下所示:https ://my-app-id.firebaseapp.com/
我正在尝试使用此域创建动态链接,但在验证步骤中失败。
它显示“我们无法验证您的域名 web.app。请检查您的设置并重试。”
我找不到任何设置来将此 TXT 记录添加到 Firebase 集成域中,我所能找到的只是自定义域,但这不是自定义的,它来自 Firebase。
有任何想法吗?