javascript - Incorporate AngularJS in an HTML File? -


first off: main goal of trying do, have 1 html file. no separate javascript files.

i know can put javascript inline html. wondering if can put angularjs inline html. every time try, doesn't work want to. not sure possible. maybe there missing. if there is, please tell me.

right now, in controller ng-app array. task, need loop through each element in array. array string, integer, integer, , array inside. of now, way know through angularjs. if there way without angularjs, please tell me.

this javascript code. html file loops through each value in array using ng-repeat.

function controller($scope) {     $scope.items = [         {name: 'xxx', max: 3, peak: 4, users: [{name: "name", ip: "127.0.0.1", date: "2014-05-19 06:45:28"}]}     ]; }

any or workarounds appreciated.

regards.

if want angularjs app inside html file, put have in js file inside <script type="text/javascript"></script>. , put @ end of file, before </html>.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -