[Answer]-Values from controller are not displayed

1đź‘Ť

âś…

Your app config is ok. But i see, you didn’t understand clearly angular concept.

You must use $scope to binding data. Also you never need “myController.product” like this notation.

I updated your code http://jsfiddle.net/33417xsm/4/

<div ng-app="MyApp" ng-controller="MyAppController">
    {{ 2 + 4 }}
    <p>{{product.title}}</p>
</div>

var app = angular.module('MyApp', []);

app.controller('MyAppController', function ($scope){
    $scope.product = {"title":"product title"};
});

Leave a comment