Thursday, November 3, 2016

some notes from trying to get an Angular app up and running

  1. install-package AngularJS at the NuGet command prompt installs AngularJS 1.5.8
  2. https://github.com/mgechev/angular-seed is an Angular2 seed project
  3. http://markdownpad.com/ is a Markdown editor for Windows and you should be able to read a README.md with it
  4. Yarn is a tool for caching locally downloaded dependencies
  5. Install-Package angular2.TypeScript.DefinitelyTyped will install some Angular2 scripts, including TypeScript, at a Visual Studio project but it will loops in TypeScript which cannot compile in alpha files
  6. http://blogs.msmvps.com/ was recommended as a good resource
  7. There is no way to upgrade from Angular 1 to Angular 2. The circumstance demands a rewrite.
  8. Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.8/$injector/modulerr?p0=myApp&p1=Error%3A%2…Bc%20(http%3A%2F%2Flocalhost%3A56663%2FScripts%2Fangular.min.js%3A21%3A179)(…) is the error I get in Google Chrome's console when I try to loop in angular.min.js in a AngularJS 1.5.8 app in Visual Studio 2015. Of course there is no way to Google against this error message which is one of the toughest things about Angular. Wait! That's only if a decorate a div with ng-app="myApp" so I'm probably missing a definition.
  9. var app = angular.module("myApp", []); ...fixes the problem above and this is perhaps a good cheatsheet
  10. per the cheatsheet <div ng-app="myApp" ng-controller="myCtrl"> will also loop in a controller and there example is:
    app.controller("myCtrl", function ($scope) {
       $scope.firstName = "John";
       $scope.lastName = "Doe";
    });

No comments:

Post a Comment