Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-boot-front

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-boot-front

front end SPA frameworks

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by80%
Maintainers
1
Weekly downloads
 
Created
Source

simple-boot-front [v1.0.0]

Single Page Application Framworks

Our primary goals are

  • Provide a radically faster and widely accessible getting started experience for all front end.

Function

  • Hot applay
  • Auto injection
  • Partial reloading

Installation and Getting Started

The reference documentation includes detailed installation instructions as well as a comprehensive getting started guide.

npm install simple-boot-front

examples project

  • Here is a quick teaser of a complete simple-boot-front application in typescript

    • index.html
      <!doctype html>
      <html>
       <head>...</head>
       <body id="app"></body>
      </html>
      
    • AppRouter.ts
      @Sim()
      export class AppRouter extends Router {
      module = App
      '' = Index
      'hello-world' = HelloWord
      }
      
    • index.ts
      @Sim()
      export class Index extends Module {
      template = html;
      data = 'default data'
      styleImports = [css]
      
          public title = new class extends Module {
              public data = '';
          }()
      
          public numbers = new class extends Module {
              public datas = [1, 2, 3];
              template = '<ul>{{#each datas as |data i|}}<li>{{data}}</li>{{/each}}</ul>'
          }()
      
          constructor(public v: ViewService) {
              super('index')
          }
      
          onInit() {
          }
      
          test() {
              console.log('test')
          }
      
          changeText($event: KeyboardEvent, view: View<Element>) {
              this.title.data = view.value;
          }
      
          changeData() {
              this.numbers.datas = [Math.floor(RandomUtils.random(1, 400)), Math.floor(RandomUtils.random(1, 400)), Math.floor(RandomUtils.random(1, 400))];
          }
      }
      
    • index.html (handlebars)
      <h1>index</h1>
      <ul>
          <li><a href="/#hello-world">hello</a></li>
      </ul>
      <div>
          <div>
              {{{title}}}
          </div>
          <div>
              title: <input type="text" module-event-keyup="changeText">
          </div>
      </div>
      <br>
      <img width="100" src="../../../assets/img.jpg">
      
      <div>
          {{{numbers}}}
          <button class="btn btn-info" module-event-click="changeData">change</button>
      </div>
      
      <div>
          <input type="text" module-value="data">
      </div>
      
      
      <div>
          <div module-isolate="data">
              {{data}}
              <button class="btn btn-info" module-event-click="test">test</button>
          </div>
          <input type="text" module-link="data">
      </div>
      
      

License

Keywords

FAQs

Package last updated on 31 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc