Answer the question
In order to leave comments, you need to log in
Why isn't a function written to scope?
I want to install a handler.
In the textbook so
Добавьте новый метод в контроллер PhoneDetailCtrl:
$scope.hello = function(name) {
alert('Привет, ' + (name || 'мир') + '!');
}
и элемент:
<button ng-click="hello('Elmo')">Привет</button>
в шаблон phone-details.html.
Answer the question
In order to leave comments, you need to log in
Hmm :)
I also thought about the browser cache, but it didn't seem to help.
then i changed
to
Voila, everything works.
Not a very pleasant introduction to Angular :(
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question