{"id":24876,"library":"a1atscript","title":"A1AtScript","description":"a1atscript (v0.5.0) is a polyfill for Angular 2 style annotations and dependency injection, designed to work with Angular 1.x. It allows developers to use Angular 2-like syntax (e.g., @Controller, @Service, @Component, @View) when building Angular 1 applications, provided an ES6 transpiler like Babel or Traceur is used. The library supports module definition, bootstrap, and integration with the new Angular router. It is currently in an early, experimental stage with slow release cadence and limited adoption; no security issues have been reported. It serves as a bridge for teams transitioning from Angular 1 to Angular 2.","status":"maintenance","version":"0.5.0","language":"javascript","source_language":"en","source_url":"git://github.com/hannahhoward/a1atscript","tags":["javascript"],"install":[{"cmd":"npm install a1atscript","lang":"bash","label":"npm"},{"cmd":"yarn add a1atscript","lang":"bash","label":"yarn"},{"cmd":"pnpm add a1atscript","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Named export; default import not available.","wrong":"import Controller from 'a1atscript'","symbol":"Controller","correct":"import { Controller } from 'a1atscript'"},{"note":"ES module; CommonJS require still works but not recommended.","wrong":"var Service = require('a1atscript').Service","symbol":"Service","correct":"import { Service } from 'a1atscript'"},{"note":"Named export; used for creating Angular modules.","wrong":"const { Module } = require('a1atscript')","symbol":"Module","correct":"import { Module } from 'a1atscript'"},{"note":"Named export; bootstrap function takes a module and optional prefix.","wrong":"import { bootstrapModule } from 'a1atscript'","symbol":"bootstrap","correct":"import { bootstrap } from 'a1atscript'"},{"note":"Named export; used as annotation.","wrong":"import { Component as NgComponent } from 'a1atscript'","symbol":"Component","correct":"import { Component } from 'a1atscript'"},{"note":"Named export; used as annotation for component templates.","wrong":null,"symbol":"View","correct":"import { View } from 'a1atscript'"}],"quickstart":{"code":"import { Controller, Service, Module, bootstrap } from 'a1atscript';\n\n@Service('MyService')\nclass MyService {\n  constructor() {\n    this.value = 42;\n  }\n}\n\n@Controller('MyController', ['$scope', 'MyService'])\nclass MyController {\n  constructor($scope, MyService) {\n    $scope.value = MyService.value;\n  }\n}\n\nconst appModule = new Module('myApp', [MyService, MyController, 'ngRoute']);\nbootstrap(appModule, 'app');","lang":"javascript","description":"Shows how to define a service and controller using annotations, create a module, and bootstrap the app."},"warnings":[{"fix":"Use a build system with Babel or Traceur to transpile code before running.","message":"Requires ES6 transpiler (Babel or Traceur) for annotations to work. Not compatible with plain ES5.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Consult the Angular 2 migration guide and use official upgrade tools for complex scenarios.","message":"The library is a polyfill for Angular 2 style but only covers a subset of features; not all Angular 2 patterns are supported.","severity":"gotcha","affected_versions":"<=0.5.0"},{"fix":"Consider using UI-Router or ngRoute for routing.","message":"The Angular new router (angular-new-router) integration is experimental and may not be maintained.","severity":"deprecated","affected_versions":">=0.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you have 'import { Module } from 'a1atscript'' and a transpiler is set up.","cause":"Forgetting to import Module or using it without transpiler.","error":"Module is not defined"},{"fix":"Check that all referenced modules are correctly imported and no circular dependencies exist.","cause":"Incorrect module dependencies or circular dependency.","error":"Error: [$injector:modulerr] Failed to instantiate module"},{"fix":"Ensure you are importing the annotation correctly and using a transpiler that supports decorators (e.g., Babel with legacy decorator plugin).","cause":"Using annotations without transpiler or incorrect import.","error":"Annotation is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}