Answer the question
In order to leave comments, you need to log in
Why is there an error when using as-syntax in AngularJS?
In short, here is the HTML
<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<meta charset="UTF-8">
<title>as-синтаксис</title>
<script src="js/angular.min.js"></script>
</head>
<body>
<div ng-controller="Controller as ctrl">
{{ctrl.hello}}
</div>
<script src="js/test.js"></script>
</body>
</html>
app = angular.module('app', []);
app.controller('Controller', function() {
this.hello = 'Hell... what the hell???';
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question