我为angular2看到的许多示例都有以下导入语句:我在VS代码中工作(使用TypeScript),它抱怨无法找到angular2/但是,我确实看到了angular2 2/angular2.d.ts中定义的绑定函数。如果我将import语句更改为以下内容,那么错误就会消失。import {bind} from 'an
angular.module('app', []).controller('MessagesCtrl', function() {
{text: 'Hellotext: 'And this is another message'}$scope.self.list = [];});
这是一个用angular如何使用EM6将其转换为angular 2。
我使用的是Angular 2.0 Alfa 35。当我导入FORM_DIRECTIVES (这是Alfa35上formDirectives的新名称)时,我得到了一个Typescript错误:
error TS2305: Module '"angular2/angular2"' has no exported member 'FORM_DIRECTIVES'.