- follow instructions here https://teletext.io/help/get-started
bower install angular-txt --save
- include
<!doctype html> <html ng-app="myApp"> <head> </head> <body> <div ng-data-txt="example.title">Text to be replaced</div> ... <script src="bower_components/angular-load/angular-load.min.js"></script> <script src="bower_components/angular-txt/src/angular-txt.js"></script> ... <script> var myApp = angular.module('myApp', ['angular.txt']); </script> ... </body> </html>
angular.module('myApp', ['angular-txt'])
.config(['dataTxtProvider', function(dataTxtProvider) {
dataTxtProvider.setOptions({
id: '695c6c04-10d6-4c2e-b05d-72f5fcaaea6b', // Compulsory
locale: 'nl-NL', // Compulsory
defaultLocale: 'en-EN', // Optional
defaultFile: null,// Optional
editButtonPosition: null, // Optional
editOnlyMode: null,// Optional
scriptUrl: 'https://teletext.io/js/1.5.2/txt-min.js', // Optional
debug: false, // Optional: default false
load: true, // Optional default true. If false does not load on start
});
}])
-
npm install
-
npm start
-
open browser
http://localhost:8081?locale=nl-NL
npm test