我正在使用Laravel 5.1和Angular JS 2.1。但我的观点并没有抓住角度指示。laravel 5.1和angular 2.1
我已经通过设在计算器的所有备选走了,也没有找到一个解决方案,请建议: -
这里是ex10.blade.php的代码
<html ng-app="nameApp">
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/2.0.0-beta.17/angular2.min.js"></script>
<script>
var nameApp = angular.module('nameApp', []);
nameApp.controller('NameCtrl', function($scope){
$scope.firstName = 'Manish';
$scope.lastName = 'Sijaria';
});
</script>
</head>
<body ng-controller="NameCtrl">
First name: <input ng-model="firstName" type="text"> </input>
</br>
Last name: <input ng-model="lastName" type="text"> </input>
</br>
Hello @{{ firstName }} @{{ lastName }}
</body>
</html>
您正在导入角度2.0,但角度标记是角度1.x. Angular 2与1.x角色的工作方式有很大的不同,并且不会向后兼容。 – jfadich