ng-repeat和selected复选框

I have a list of checkboxes that I need to mark as checked based on a PHP array

<?
    $selected ['1', '100', '250'];
?>

<script>
 $scope.articles = [
    "1",
    "2",
    "100",
    "250",
    "500"
]
</script>

<ul>
    <div ng-repeat="article in articles">
        <input type="checkbox" ng-checked="?" id="{{article}}">
    </div>
</ul>

the problem is that I don´t know how to "connect" the php array with the angularjs part. I can echo the php array but not sure how to pass it to JS

thank you.

Agree with comment by @Ele, you should have it in angularjs service, fetch it from the backend. Have a method in your service, pass the article.Id to it, that service will check if passed id is present in the array or not, based on that your checkbox will be set.

Template:

<div ng-repeat="article in articles">
   <input type="checkbox" ng-checked="isArticlePresent(article.Id)" id="{{article}}">
</div>

Controller

$scope.isArticlePresent = function(id){
return service.isArticlePresent(id);
};

Service

this.isArticlePresent = function (id) {
    //Write your logic, and return true/false
}