AngularJs forms directive should have controller included in suite. Why does it say it's missing 'form' controller - angularjs

I'm migrating my application from AngularJs 1.5.6 to Angular 15.3.3.
The form directive I'm using was working pre-migration but now is throwing this error:
Controller 'form', required by directive 'form', can't be found!
I can't understand what is happening to cause this considering forms are native to AngularJs. The angularJs package spec'd in the package.json is the same version so there's no changes there.
This is the code snippet for the form (using Jade/Pug) for templates:
form(ng-if="vm.editing" class="form-group edit-product-form" name="form")

Related

After angular.bootstrap in ts file the angularjs not rendering anything on the browser showing empty page

Well by following guide from one tutorial and https://angular.io/guide/upgrade
I manage to make angularjs bootstrap by using this
angular.bootstrap(document.body, ['heroApp'], { strictDi: true });
i am working on mvc dotnet web application
problem is that after putting that code in app.module.ts file and removing ng-app from html index page.
nothing is loading on the page. empty page. nothing load from angularjs directive and angularjs file.
help me to figure out this.
Thanks in advance
After this i will upgrade angularjs to angular 4 after making this bootstrap
app.module.ts is Angular 2+ related but
angular.bootstrap(document.body, ['heroApp'], { strictDi: true });
is AngularJs related
so you can't combine the 2 methods
there is no straight way to upgrade from agnularjs to angular because angularjs is mvc ES5 framework but angular is component oriented ES6 framewok

How to use a directive as an entry point when using angular's bootstrap function?

I have an angular 1 app that's being bootstrapped onto a Java web page (legacy app) using ng-app tags. I'm trying to create a hybrid app using Angular 2's downgrade capabilities.
In order to do this I need to remove ng-app tags and use the UpgradeModule from #angular/upgrade/static and bootstrap using the upgrade.bootstrap(document.body, ['myapp']). However, most of the components of the app, including the entry point of the app, are just plain old angular 1.2 directives.
From the examples I've seen, they are using the controller="MenuCtrl" syntax to add components to the page. Is it possible to use directives as the entry point to the app? e.g.
<div my-menu-directive></div>
Currently, nothing is showing up in the app since I've removed the ng-app tags, but the app is definitely being bootstrapped. I'm just not seeing any of the directives.
Fixed this by wrapping the bootstrap statement in angular.element() like so:
angular.element(function() {
upgrade.bootstrap(document.body, ['myApp'], { strictDi: true });
});

Attribute Directive written in angular2 cannot be used from angular 1 app with downgrade?

This is strange, I was downgrading a lot of components from Angular 2 to Angular 1 app and everything working great. I was thinking directive will work too, but seems they don't?
This is my downgrade of directive:
angular.module('myApp')
.directive('tooltip', downgradeComponent({component: TooltipDirective, inputs: ['tooltip', 'placement']}) as angular.IDirectiveFactory);
Thats not helping. I know that directive is a component without a template, but it still a component.

Angular Meteor - Blaze is not defined

I want to use blaze from my angular controller, similar use as
https://github.com/dotansimha/accounts-ui-angular/blob/master/login-buttons-directive.js
Blaze.render(Template.loginButtons, element[0]);
When I try that from my own directive I get - "ReferenceError: Blaze is not defined".
My angular app decleration includes angular-meteor and I also tried to call angular-blaze-template but it's still not being recognized.
I'm not sure why it's working on accounts-ui-angular directive and not on mine

ngRequired error with custom directive

I'm using ng-required with my custom directive with angular 1.4.7
<my-directive ng-required='vm.dane.zaplacone!=1'></my-directive> and I have Error: [$compile:nonassign] - https://docs.angularjs.org/error/$compile/nonassign?p0=vm.dane.zaplacone!%3D1&p1=ifInputLabel
But validator works as it should - what's worng - I think I didn't saw it with angular 1.4.5 but I don't see any changes in changelog concerning ngRequired

Resources