It takes some time for example first it loads angularjs as it and then load output.How i can improve it? First load:
after taking few seconds time output is correct:
var app = angular.module('myApp', []).config(function ($interpolateProvider) {
$interpolateProvider.startSymbol('{[{').endSymbol('}]}');
});
app.controller("myCtrl", function($scope) {
$scope.firstName = "John";
$scope.lastName = "Doe";
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
{[{ firstName + " " + lastName }]}
</div>
2
Answers
you can add
ng-cloak
to avoid it.ng-cloak will do that job for you, it doesn’t let angular expressions to print on view, read the documentation for more details:
https://docs.angularjs.org/api/ng/directive/ngCloak
you can use it for whole body or on elements as well like: