angularjs-migration's Issues
How to get angularJs state resolve data in Angular Component ?
How to get angularJs state resolve data in Angular Component ?
here is the example how do i get currentAccount
value in component ?
export default function BaseStates($stateProvider) {
$stateProvider
.state('base', {
url: '/',
abstract: true,
resolve: {
currentAccount: function() {
return 'some Data'
}
},
views: {
'appBroker@base': {
template: '',
}
}
});
}
@component({
selector:'appBroker',
template:<div *ngIf="currentAccountt.owner" class="card mt-5 text-center">...</div>
,
})
export class AppBrokerComponent {
constructor(){
}
}
angular.module('mySurex').directive('appBroker', downgradeComponent({
component: AppBrokerComponent
}))
Angular 9 - Unable to downgradeInjectable
Hi,
I was going over your lectures one step at a time and at step 7, I see the below error when running in Angular 9 + AngularJS 1.7.9
hybrid. Can you please help?
bundle.js:36704 Uncaught Error: Can't resolve all parameters for ApplicationModule: (?).
at syntaxError (bundle.js:36704)
at CompileMetadataResolver._getDependenciesMetadata (bundle.js:56733)
at CompileMetadataResolver._getTypeMetadata (bundle.js:56625)
at CompileMetadataResolver.getNgModuleMetadata (bundle.js:56493)
at CompileMetadataResolver.getNgModuleSummary (bundle.js:56300)
at bundle.js:56414
at Array.forEach (<anonymous>)
at CompileMetadataResolver.getNgModuleMetadata (bundle.js:56402)
at CompileMetadataResolver.getNgModuleSummary (bundle.js:56300)
at bundle.js:56387```
Filters == Pipes?
Hello, so i am currently migrating angular 1.6.6 with this tutorial.
Sofar anything works fine.
But i have a question for the filters.
Are filters now Pipes? and Why is the filter folder still in Step 10?
Shoudnt it be deleted?
Thx 4 this amazing tutorial. Hope you could help me with this last question.
Unable to load HTML templates set in src attribute of ng-include in PRODUCTION build
I have successfully migrated my code using this tutorial but I'm unable to create a production build, I'm using ng-include in some places, and webpack is unable to resolve the template Urls(html)
Templates loading
Hi Asim Hussain,
Your migration project looks promising and very helpful to whoever looking to migrate to latest angular from their old AngularJs projects.
One quick thing I can't understand is that about creating production bundles using webpack. To be more specifically about template files. I understand we bundle all our js/ts files using ts-loader, how about hml files?
In prodcution, when we lazy load a component, how will get the template for that component, if we use templateUrl syntax?
Should we copy all the html files to production server as part of webpack build process? Or should I create template cache module?
I'm not in favour of creating templateCache module as it beats the purpose of fully utilising lazy loading of components in the
in the first place.
Note: I'm in the first phase of migrating, that is including webpack into the project. I have no problems in dev environment as I have all required html files available here, but when we create production build should we also copy those required html files to production server?
I'm kind of stcuk at this phase. Your help is much appreciated.
BTW, I'm using html-loader, ngtemplate-loader with webpack 5.
Thanks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.