Joseph Michael Pesch
VP Programming

Angular 4 with Bootstrap using CLI

by 21. July 2017 11:20

Angular 4 with Bootstrap using CLI

    ng new ...
    npm install --save @types/jquery
    npm install --save @types/bootstrap
    add to index.html (head tag):
        <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
        <script src="node_modules/jquery/dist/jquery.min.js "></script>
        <script src="node_modules/bootstrap/dist/js/bootstrap.js "></script>
        
TypeScript Guid class:        
class Guid {
    static newGuid() {
        return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
            var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
            return v.toString(16);
        });
    }
}

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading